How to Migrate a WordPress Site to a New Domain
Use this tutorial to avoid many of the common problems experienced with migrations.
Deactivate All Plugins
Firstly, it’s recommended to deactivate all plugins, because when moving a WordPress site to a new host, WordPress plugins tend to fail.
To deactivate all activated plugins, go to the admin page -> Plugins > Installed Plugins > Mark all > Bulk action > Deactivate > Apply
The Backup Process
It’s best practice to always backup your website before making any changes, and a WordPress migration is no exception. There are a couple of WordPress plugins for doing this, but a manual approach is best if you want to be in complete control of the process.
Backing up your database
To back up your WordPress database manually, log in to your phpMyAdmin which you can find on your domain hostings cPanel or Konsole, click on Manage MySQL or your WordPress Database Manager. This will load a new phpMyAdmin window, then select the Export tab.
Backing up your content
It’s recommended that you download your complete WordPress installation folder so that you won’t lose anything.
Using an FTP client like FileZilla, log in to your host by FTP and download your www, httpdocs or public_html folder, or wherever your WordPress content lays.
Once FileZilla is installed, open it up and select -> Site Manager > New Site > Enter your FTP Credentials > Click Ok (to save it for future use)
To start the backup process, on the left pane simply navigate to the folder where your database is stored, click and drag the public_html folder to the folder in the left pane.
This may take a while, depending on the size of your WordPress Site.
Restore Your Database and Content
Now that you have the backup, a few things must be modified before moving on to uploading the backups. Before proceeding, log in to phpMyAdmin of your new host and create a new database.
Select the new database and click on the Import Tab > Choose File(browse to the folder where you saved it earlier) > Select Go:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
Editing your WordPress Config
The next step is to edit your wp-config.php file before restoring the site content.
Find the wp-config.php in the backup of your sites content.
Edit the lines below, replace with the details of your new host and save the changes.
This time you’ll FTP into the new host, find the public_html folder and drag and drop all the files from your backup into this folder.
Your website should automatically come online once the upload completes, provided all the above steps were done correctly.
Go grab a cup of coffee , you’re almost done – uploads take longer than downloads, especially if your on broadband/ADSL.
Once your website is online, login with your old WordPress Admin username and password(you havent changed this so it should still work) then reactivate all your plugins to restore your sites full functionality.
Lastly update your permalinks, navigate to Settings > Permalinks, select the preferred permalinks structure and Save Changes.
Hopefully this tutorial has been helpful, if not we recommend using a plugin that helps you with the backup and restore process:
This plugin will make the backup and restore process simpler, but you will still need to complete all the other steps mentioned above.
If you need help with migrating your website to another host, you may contact us for assistance for a small fee of $29.00 to perform the complete migration process for you.