At HostAfrica, besides our normal cool web hosting packages, we have some great WordPress hosting options. In this guide, we would like to help you make the move to HostAfrica a lot smoother. Moving WordPress can be a massive headache if not done correctly. If you are not keen on using a plugin to help your move, or simply cannot install the needed plugin, this is your guide.
Backup and Cleanup
Before you do anything it’s a great idea to backup your entire site. If anything goes wrong, you can quickly restore your site and everything will be back to normal. While you are at it, check for any unused or non-critical plugins and remove these. You can always re-install these on the new site. There are two parts to backing up your WordPress site: Database and Files. You need to back up the entire site, and you need to back up your WordPress database.
WinSCP and other programs allow you to sync with your website to keep a mirror copy of the content on your server and hard drive updated. It saves time and makes sure you have the latest files in both places. Most website hosts provide software to back up your site. Check with your host to find out what services and programs they provide. Using FTP Clients or UNIX Shell Skills you can copy the files to a folder on your computer. Once there, you can zip or compress them into a zip file to save space, allowing you to keep several versions.
Back up your WordPress database regularly, and always before an upgrade or moving WordPress to a new location. The following information will help you back up your WordPress database using various popular server software packages. We advise using phpMyAdmin to backup your WordPress database, but there are also various WordPress plugins that will do the same job. The most important is to get a DUMP of your WordPress MySQL database and then to download it.
Once you have your extra backup, you’re all set to start the migration.
Download Your Site’s Files
Fire up your favourite FTP program and enter your site’s FTP details to connect to your server. If you don’t have an FTP account, it’s easy enough to set one up. If you’re using cPanel, log in and click “FTP Accounts” in the “Files” section. Enter your desired login information and make sure the directory you select includes the location of your site.
Create a Fresh Install
Now you need to create a database on your new server and edit your site’s wp-config.php file to reflect the changes to your database. You could do this manually, but the easiest way to do this is by creating a fresh install of WordPress automatically. At HostAfrica, we offer one-click WordPress installation. Once your fresh install has completed, download the wp-config.php file using FTP or cPanel’s File Manager and save it to your computer, replacing your old copy. If you made any changes to your old wp-config.php file, be sure to edit your new one to add in those changes to avoid errors.
Upload Your Site
Login to your new server through FTP and select all your site files from your computer. Move them to the folder that contains your fresh install. You’ll need to make sure you’ve created an FTP account for your new server. You’ll see a pop-up appear if you’re using FileZilla that will let you know you already have a file that exists with the same name. We will replace the files of the fresh install with the ones for your original site. Keep the default “Overwrite” option selected. Also, select the check boxes for “Always use this action” and “Apply to current queue only.” Once you have made these selections, click the “OK” button. It will take a while for your site to upload.
Drop Your New Database Tables
Login to phpMyAdmin on your new server and select the name of the new database that was created with your fresh install from the menu on the left. The page should populate with tables. Click the “Check All” box at the bottom and in the drop-down box next to it, select “Drop.” A new page will load asking you if you’d like to drop all the tables. Go ahead and click the “Yes” button.
Upload Your Database
Once that’s done, click the “Import” button at the top of the page. Your now empty database should still be highlighted from the menu on the left. If it’s not, be sure to click it again or this step won’t work. Click the “Choose file” button that appears on the page. Now select the database file that you saved on your computer. The other default settings should be fine. Click the “Go” button at the bottom of the page to complete the upload.
Update Your Nameservers
The only thing left to do is ensure your domain is pointed to your new server. You will need to locate your nameservers which are usually in your account settings and could have been emailed to you when you opened your hosting account. Once this has been done, it will typically take up to 48 hours for your settings to propagate and for your site to appear on your new server. If you’re not sure if it worked, you can lookup your site through WHOis.net and check to make sure your new nameservers are listed.
In our next article, we look at some WordPress Plugins which make migration a lot easier.