Nowadays, website migration can be a real problem to deal with and sometimes it is a nice problem to have, because you know that you are moving to a better, more secure or cheaper hosting. In this tutorial I’m gonna show how to migrate your WordPress site to a new hosting or server.
These are the most common ways to migrate your WordPress based website:
a) Use a migration or backup plugin (plugins tend to have different server configuration issues, like PHP execution timeout).
b) Transfer everything manually by using FTP and MySQL (very tedious and hassling).
c) Use a website backup service (the method that I’m going to show, in this case using BackupGuard).
There are several hints for WordPress based websites covered in this tutorial that will make this process the smoothest possible. So let’s start:
1. First of all, you have to sign up in BackupGuard, successively activate your account and sign in.
2. Now you are able to add your website and proceed, but before, let’s get the FTP and DB credentials that we need for that (if you already have them, you can skip this step).
In this example, the hosting I’m transfering from has cPanel and below you can see how it looks. Find FTP Accounts and click on it:
Scroll down and you will see all FTP accounts already created for your hosting. You can either use one of them or create a new account. If you click on the Configure FTP Client action link you will see all the FTP credentials you need (besides the password):
Now let’s get the database credentials. You can get them also from cPanel but I’m gonna show you how to get it from your WordPress configuration file. Find the wp-config.php file inside your website’s home directory and open it. You will see something like this:
You are gonna need the values of DB_NAME, DB_USER, DB_PASSWORD and DB_HOST constants.
3. You are ready to add your first website. You can get instructions on how to do that in this link.
4. Now that you are back in the Websites section click on the green Backup now button next to your website. The backup process will start and after it is finished you’ll be able to see it inside the Backups section.
6. Now you are ready to migrate your website to your new hosting/server. Go to the Backups section and click on the blue Restore button:
7. Inside the restore section change the Advanced destination options to match your new server’s credentials and when you are ready press Start restore button:
8. After the restoration is over, all your files and database tables have been transferred to your new server and there is only one step left and that is to update your WordPress configuration.
a) Find the wp-config.php file inside your new website’s home directory and open it. Change the database credentials to match with your new server’s credentials.
b) Finally, change the value of the siteurl option inside the wp_options db table to match with your new hosting’s url.
That’s it, your website has been successfully migrated to a new hosting/server. Although seems that there are a lot of steps involved in this process, I can 100% recommend you this method because you WordPress plugins always tend to have problems with the server configurations.
Also, now that everything is set up, you can continue using BackupGuard for keeping your website safe, backed up in the cloud.