This is the 5th post in the series for shifting websites from one server to another. The earlier posts in this series were as follows:
- Shift website hosting – part 1 (static site)
- Shift website hosting – part 2 (leftover emails)
- Shift website hosting – part 3 (1) (dynamic sites, CMS)
- Shift website hosting – part 3 (2) (dynamic sites, Forums and Blogs)
In my last post I mentioned that series of manually transferring the sites was complete. But then I thought about this new way of transferring dynamic sites (with a database) with minimum downtime. Irrespetive of DNS propogation or DNS cache with ISPs, this method can transfer your dynamic sites almost instantly. Downtime will only last the amount of time you take in transferring the database from old hosting provider to new hosting provider. In my opinion, this is the most efficient way of transferring dynamic sites. Here are the steps.
- Tansfer all the core code files i.e. .html, .php, .css, etc. to the new server.
- In CMS based sites, stop updating the contents. In blogs, disable the comments. In forums, change appropriate settings and disable posting by all categories of user or disable the forum.
- Transfer the database to the new host.
- Now, this is the most important part. In all web-applications we need to specify the database location. It can be either localhost or an external IP address. Search for this option in your web-application and at your old hosting account, change localhost to the IP address for remote database connection provided by your new hosting provider. This change will take effect immediately i.e. as soon as you submit.
- Now you can resume site updates, blog comments and user postings in forum at the old hosting 🙂 because now all user activity will update the data in the database situated at the new server.
- Now change the DNS of your domain name, sit back and relax! Even if ISPs take 7 days to update their DNS cache, you have nothing to worry. All the changes to the database will take place at the new location.
I think now the series is complete. Of course, I may prove my own self wrong again. 🙂 But at present, I think it is complete. Next post (hopefully) will be how to transfer site with the help of features provided in cPanel.