Recently, and after a lot of research, we moved to a new web host — Big Wet Fish. They’re great, you should go check them out. And if you decide to go with them, please use this link to tell them we sent you!
The up side of making the move was that now we have much more reliable service, for us and our clients, as well as excellent customer care. The down side? Well, there was no down side as such, but moving all our clients’ websites proved to be a little bit tricky! In particular, moving database-driven sites (e.g. WordPress) caused a couple of extra grey hairs to appear.
Of course, by the time we were moving the last website, we discovered a plugin that made the process much more straightforward; in fact it made the move pretty much seamless. We decided to share our process with you for when you find yourselves in the same boat!
1. Make sure you have the following to hand:
- Access to the Admin area of your WordPress site
- FTP details for both your old and new web host
- Access to your new web host management platform (e.g. cPanel)
- Access to phpMyAdmin (database management) on your new web host
- The DNS nameservers of your new web host
- The IP address of your new web server
2. Pick a “low traffic day”. It is best to make the move when you don’t expect to receive a lot of visitors to your website, just in case you run into difficulties. For example, if your website receives a lot of hits at the weekend rather than during the week, it is better to schedule the move mid-week. If you have Google Analytics (or similar) installed, you should be able to gauge when the quietest time of the day/week/month for your site is.
3. Log into the Admin area of your website and deactivate any plugins. When you are moving a WordPress site, most of your problems will involve plugins.
4. Download the Online Backup for WordPress plugin, install and activate it. Once you have activated it, go to Tools > Online Backup, then the “Backup” tab. Under “Backup type”, select the “Download” radio button then “Start Manual Backup”. Once the backup is complete (it can take several minutes, depending on the size of your website), download the backup to your computer. This will be saved as a ZIP file which you can then extract.
5. Go to phpMyAdmin on your new web host and create a new blank database. Make a note of the following details as you will need them in the next step: Database Name, Username, Password, Database Host. From your backup, locate the OBFW_Database.sql file (in the Database folder). In phpMyAdmin, click on “Import” from the top menu. Click the “Browse” button, select the OBFW_Database.sql file and press the “Go” button at the bottom of the page to upload the database.
6. From your backup, locate the wp-config.php file. Change the details for DB_NAME, DB_USER, DB_PASSWORD and DB_HOST to the details you made a note of in the previous step.
7. Connect to your new web host via FTP and upload your whole site to the public_html folder — if public_html does not exist, check with your web host which folder to upload to. Once this has uploaded, you should have a new mirror of your WordPress site.
8. You may be moving your website to a new web host but want it to be accessible from the same web address/domain name. In this instance, follow step (a) below. If you want to change it so that it is accessible from a different domain name, follow the instructions in step (b) instead.
(a) If your website has the same web address: If you are a Windows user, go to C:\Windows\System32\drivers\etc and open the “hosts” file. Go to the end of the file and create a new entry with the IP address of your new server and your website’s domain name, e.g. 220.127.116.110 exampledomain.com. Save the file and close it. You may need to restart your computer before the changes will take effect. This change will enable you to see the new mirror of the site by going to its normal address (exampledomain.com). The rest of the world will see the current website that is on your old hosting account, whereas you will see the new one. This will enable you to make sure that your site is working properly before launching it to the public.
(b) If you want your website to be accessible from a new domain name: There are a couple of changes that you will need to make to the database. Go to phpMyAdmin and go to the “options” table of your database (N.B. The table names will often, but not always, start with a prefix such as wp_). Change the values in the “siteurl” field (on the first page) and “home” field (on the second page) to point to your new domain name. Once you have made these changes, go to the Admin area in WordPress, and double check in Settings > General that the WordPress Address and Site Address have been updated to your new domain name. Go to Settings > Permalinks, make sure the new domain name is appearing in the settings and then click “Save Changes”.
9. In the WordPress Admin area, activate the plugins that you deactivated in step 3. If you are having problems, activate them one by one and then view your website after each activation. If one (or more) of your plugins is giving you problems, it’s best to contact the support team of your new web host and ask them for guidance. After you have activated everything, test the basic functionality of your site, e.g. fill in the contact form, make sure your pages/posts/pictures are appearing as expected, leave a comment on a blog post, etc.
10. Once you are happy that everything is hunky dory, change the nameservers to point to your new web host. To do this, you need to contact your domain registrar or log into the registrar’s website and use the online tools provided by them. This can often take up to 48 hours to change. Once the change has taken place, your domain name will now point to the website hosted on your new web hosting account. Any changes that are made to your site after you backed it up (e.g. if someone leaves a comment) will not appear on the “new” site and will have to be added to the database manually once the switch is complete. N.B. If your website has the same domain name and you followed step 8(a), go back to the “hosts” file and delete the entry you made as it is no longer needed.
11. Install the Online Backup for WordPress plugin again on your new website and create a fresh backup. It is a good idea to do this regularly, in case anything goes wrong.
12. Once you are happy that everything is working as expected, you can safely delete your old website. It is a good idea to leave it for a few weeks, just to make sure there are no unexpected glitches. To do this, “drop” the database (in your old web hosting account) and then use FTP to connect to your old account and delete the files. Now you have a single instance of your website stored on your new web hosting account.