Credit: Justin Dzama (www.dzama.ca)
Moving WordPress from one domain to another can be intimidating, but it doesn’t need to be the bane of your existence. If you know the easy way to do it, you can get it done in 16 minutes flat (depending on the size of your website). Surprisingly enough, there aren’t very many articles on the net on how to “easily” move a WordPress site from an old domain to a new domain. Now why would you want to do such a thing? Well, maybe you’re tired of your old domain and want to move your site to a new domain, or maybe you just want to migrate a WordPress site from a development server to a production server. No matter the reason, it’s gotta get done, so here is the easy way to do it. For the steps below I’m using the following (which is up to date at the time of writing this article):
- cPanel: 11.30.5 (build 2)
- phpMyAdmin: 188.8.131.52
- WordPress: 3.2.1
If you don’t have exactly the load-out above, it should be fairly easy to fill in the gaps.
1. Download all the files from your server.
This includes the WordPress core, your themes, all the files you’ve uploaded (Everything!)
Ideally use cPanel file manager to compress the folder and download it (faster than FTP)
2. Download the WordPress database via phpMyAdmin
You can access phpMyAdmin via your cPanel
Select the database name from the side panel
Click on the “Export” tab
Click the “Custom” radio button
Make sure all of the tables are selected
Output Section should look like:
Format should be set to SQL
Format Specific Options should look like:
Object Creation Options should look like:
Data Dump Options should look like:
You should now have a zip file of both the database and the files
3. Set up the database on the new server as your would with any WordPress install
If you’re not sure how to do this, follow these instructions
4. Unzip the file containing the WordPress files (if not already done) and modify the wp-config.php file
Replace the old database information with the new just like in a fresh install
Add the following two lines to the config file replacing newdomain.com of course:
5. Import the downloaded database into the newly created database via phpMyAdmin
Select the new database name from the sidebar
Click the “Import” tab
Click “Browse” and select the database file (Should end in .sql.zip)
Wait for the success message
6. Upload the files to the new server
You can do this via FTP but it is much faster to upload using the cPanel File Manager:
Zip the contents of the WordPress folder (not including the folder itself)
Log into the cPanel of the new site
Open the File Manager
Upload the zip file to the desired location and extract its contents
Refresh the directory and delete the zip file
If the file unzipped into a subfolder, move its contents to where you want it (drag & drop)
7. Log into the new website
Go to www.newdomain.com/wp-admin and log in using the same login you used on the old site
8. Install and Activate the “Search and Replace” plugin
Scroll to the bottom of the Search and Replace Plugin and check all of the Search In options on
In the “Search For” field put the old base URL without the trailing slash or http://www.
In the “Replace With” field put the new base URL without the trailing slash or http://www.
*Note: WordPress recommends against ever changing anything in the GUID. Doing so will cause feed readers to display all of the posts on your site as “unread,” which could annoy the hell out of your blog readers. However, if this is a fresh blog that you’re moving from a development server, I can’t see it being a problem. Use your own discretion and leave that box checked or unchecked.
Wait for the search and replace to complete
9. Fix Your Widgets
The one place that Search and Replace plugin didn’t, well… Search and Replace was the widget area. So you’ll need to open up each widget and replace the old URLs manually
10. Fix the broken things.
You may notice that some things may still be broken
Permalinks are notorious for acting up. If so, head to the “Permalinks” section, make sure they’re set right, and click “Save.” This will usually do the trick
11. Change Privacy Settings!
This is a pretty big deal (and very easy to forget) when moving the site from a development server to a production server. Make sure that “” is selected under wp-admin -> Settings -> Privacy.
General SEO rule of thumb: Don’t tell search engines to go away when they are trying to index your site.
12. Triple Check Everything!
Check all of the links to make sure nothing leads back to the old site
If you don’t have it already, get FireBug for Firefox and inspect all of the image/file links to make sure nothing is linking to the old site
There you go; about 16 minutes after you started, your site is enjoying it’s new home at it’s new URL. No stress, no worries, and no headache.
If you’re reaping the benefits right now or think you’ve got a way to improve this method, leave a comment below.