How to Migrate WordPress

To migrate WordPress is a fairly easy process.  There are 5 basic steps you’ll want to follow.

  1. Download your wp-content directory
  2. Export your database
  3. Install WordPress to the New Site
  4. Upload your wp-content directory
  5. Import your database

First Step

Download your wp-content directory.  Easiest way to do this is to connect to your account via FTP and then download your wp-content directory to your computer.  So you’ll want to connect to your account via FTP:

Once you are connected you’ll need to locate your wp-content folder.  It will be with the rest of your WordPress installation.  Mine is located at /public_html/alexcarver/bad/

filezilla_down filezilla_wp

Once I located the wp-content, I just dragged it over and downloaded it to my computer.

Step Two

Exporting your database.  If you are not sure what database you need to export, download the wp-config.php, open it with a txt editor like notepad and look for this line.

define(‘DB_NAME’, ‘username_wor1’);

From that you know you have the wor1 database.

Now you’ll want to go to your cpanel, and then log into phpmyadmin.  Select the database from the list on the left.  Then click on the export in the top Right of the menu.

phpmyadmin phpmyadmin_db phpmyadmin_export

No you have the database saved as a .sql on your computer.

Step Three

Install WordPress to the New Site

I’ll be using Mojo Marketplace to install WordPress, and I’ll be installing it to

Here’s a guide on how to install with Mojo:  after the install finishes be sure to note what database was created for the install.  Mine was username_word

Step Four

Upload the WP-content directory.

You’ll need to rename the one that was installed to something like wp-content-old or wp-content-stock.  Open back up into Filezilla and now go to the directory of your wordpress install. (If this is on a new server, you’ll need to connect to that server).

For me I’m looking for /public_html/carvertown/bad

Right click on wp-content and rename it.

Then upload your wp-content.


Once that’s uploaded you just have one step left.

Step 5

The last step to migrate WordPress is to import your database.

Now you’ll want to go to phpmyadmin, remember the database name from earlier?  You’ll want to click on that database name now.


Then click on import


Chose to upload the .sql that you exported to your computer earlier


You will notice that the new install has the wp_ prefix on it while the one we are migrating has the qao_ prefix.  So the prefix will need to be changed in the wp-config.php  However, before we leave phpmyadmin lets update the siteurl, homeurl, and reset the permalinks.  Click on qao_options


Click on Edit on the line for Site URL and update it with the new url, in my case,  As well click on Edit permalink_structure and delete whats there and save.  When migrating wordpress sites the links break, so you’ll want to resave the permalinks from your wordpress dashboard.


Now you’ll want to go to page 2 and do the same thing for the HomeURL.

phpmyadmin_options3 phpmyadmin_options4

So, now back to the prefix issue.  You’ll want to log into your File Manager from the cpanel, then go to the directory for the new site.


Right click on wp-config.php and choose Code Edit, then edit.  You will want to scroll down and edit the prefix to match the prefix of the tables that you imported.

wpconfig_old wpconfig_new

And now you have successfully migrated a WordPress Site!!!  Great Job!!!

Posted in Archived Posts and tagged .