Here I’ll introduce you to an awesome plugin that I’ve been using each time I need to transfer my WordPress site from my test server to the live one. But first, the steps on how to transfer your WordPress site are as follows:
- Create a backup of your WordPress files and database.
- Install WP Migrate DB plugin and export your database.
- Copy your WordPress files to the new server.
- Create a fresh database in the new server and run the MySQL dump you created to populate it.
- Update your database parameters in wp-config.php
Note: You might have to revisit and re-update your Permalinks in wp-admin after the transfer if the links act funny!
I will only discuss Step 2 in further detail, but I created a post similar to this one explaining the other steps here if you’re interested.
Anyway, yes the plugin is called WP Migrate DB and basically it exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer. I find this very useful because with this I can easily export my database and have my paths (of images mostly) updated as well. This way, my WordPress installation at my test server remains intact.
To export your database, just click Tools > WP Migrate DB and you will find a form like this:
You just have to fill the current address and the new address. Also, you have to specify the current file path of your server. If you’re not sure how to find this, you can usually see this in the File Manager section of your server’s control panel.
So far I have only transferred sites with servers using cPanel and Plesk. The file path of cPanel looks the same as above. Just substitute “newsite” or “testsite” with the account name. For Plesk, the file path looks more like this: /var/www/vhosts/mydomain.com/httpdocs. You guessed it – just substitute your domain name in “mydomain.com.”
Check Save as file to your computer and in moments you will be able to download your exported WordPress database updated with the new paths and domains you specified. This is the SQL file that you will need to populate the new database you created in the new server.
As a last note, I’m not connected with the creator of WP Migrate DB in any way. I just find the plugin very useful and felt compelled to blog about it 🙂 Cheers to Mr. Brad Touesnard!
Image credit to asifthebes