Disclaimer

This blog is kind of my own personal work Notebook, and the processes below are only guaranteed to work for my specific configurations. So, use this info at your own risk, and please understand I won't be able to provide any help if you break something

Friday, February 15, 2013

A Guide to WordPress Migration using the ‘Duplicator’ plugin


This Post covers the migration steps required for the migration of a WordPress installation using the 'Duplicator' plugin.

Please note that while all these steps have been thoroughly tested on many situations, they may not work in other scenarios depending on the configuration of the server and a number of factors. For example, one known issue at the time of writing is that the Migration Script requires at least PHP v 5.2.17+ running in the destination server.

Exporting

With these first steps we describe the actions to be taken at the original website.

Login to the original WordPress installation:
Make sure that WordPress is running the latest version, if it isn't you will see a warning at the top of the pages in the Administration area urging you to update WordPress. Do that BEFORE attempting to start the migration process, as the modules are prepared for the latest version.

Install and activate the 'Duplicator' plugin:


Once it is installed and activated you'll see a new item named 'Duplicator' at the left side navigation menu of the pages in the WordPress Administration area.

Click on 'Dashboard' just below the new item named 'Duplicator' and you'll be presented with the following screen:



Create a Package:
To create a new export package click the create button (highlighted in red) and then 'Create Package'.
You don't really need to assign a new name, as it does not interfere with the process at all. By default it uses a slug that contains the name of the original WordPress installation followed by the current date, such as '20130215_xxx'.

Neither you need to pre-test the Package before clicking 'Create', as that feature is meant to make sure that very big packages can actually be generated without space problems.

It shouldn't take more than 1-2 minutes to complete (depending on how many pages are being migrated) before both the Installer and the Package files are created:

Click on each of the buttons to download both files to your computer.



Importing

With these steps we describe the actions to be taken at the destination website.

Upload Package via FTP to the destination website: 
Fire up Filezilla or FTP client of choice and upload both 'installer.php' and the zipped Package file to the destination website.
Depending on what version of PHP the server is running, there could be another file you need to upload. In our case, the solution provided by our web hosting provider was to add the following line to our .htaccess file:
AddType application/x-httpd-php53 .php

Create MySQL database:
Log in to the cPanel of the destination website and run the MySQL Database Wizard to create a new database and a user associated to it with 'ALL PRIVILEGES'. Make a note of the credentials that you will use in the next step.

Initiate Import:
Next visit your new destination website using a browser, where you will see just a text page with the 2 files we have uploaded by FTP (only 2 because the .htaccess file is not visible when browsing):


Click on 'installer.php' and the import operation should start and you should be presented with a screen where you must introduce your MySQL credentials.

Paste the MySQL database credentials from the previous step and click on the button that says 'Test Connection …'. You should see now a 'CONNECTION SUCCESFUL!' message.



Next tick 'I have read all warnings & notices' and click on the button that says 'Run Deployment'. You will come to a screen that shows the 'Old Settings' and the 'New Settings', no need to change anything here, just click on the button that says 'Update Tables'.

Final Steps:
That's it. The new site should be now migrated and live, but as recommended in the following screen, you should 'Resave Permalinks' and 'Delete Installer Files'.

Both operations require login to the new WordPress administration back-end, using the same exact credentials from the original WordPress installation.

2 comments: