
I moved a WordPress blog to a new server and a new address this week. It was one of those jobs that I dreaded doing but didn’t turn out to be too complicated. And I’ve not lost any traffic!
Why was I moving a WordPress site to a new domain?
A few months back I created a site about WordPress, blogging, SEO, SM and internet marketing. I called it (maybe I didn’t spend too long thinking about this) WordPressSEOMarketing.com – catchy, huh?
It turns out that it is illegal to use “WordPress” in a domain as it is copyrighted. I spent a lot of time trying to decide on a new domain name for the website. In the end, I decided on WPBlogTalk.com.
How to move a WordPress site
Here is a basic synopsis of what you need to do.
- Register the new domain with GoDaddy or Namecheap or some domain name registrar
- Point the Name Servers at the domain name registrar to the new host
- Set up the new domain at the new host
- Copy all files and database (see below) from old site to new site
- Edit
wp-config.phpto have the right database settings and add code for new domain (see below) - Install the Search and Replace plugin to search for old URLs and replace them with the new URL
- Go through new site checking links, etc., change logo and branding, create new email subscription, change any product URLs, etc.
- Add 301 redirection from old blog to new blog
- Change feed URL in Feedburner, set up new Google Webmaster Tools and Google Analytics accounts to monitor indexing and traffic of new site
Now, what could be simpler?
If you don’t count waiting for files to copy, the actual process of moving a WordPress site only takes a few minutes – but you need to spend time checking the new site and changing some superficial elements.
The first three steps of the above synopsis are simple enough. And copying the files is an easy job to do with any FTP client. However, copying a database is always a little more complicated.
If you have Shell (Telnet or SSH) access to the hosts this can be done with one simple command line:
mysqldump -h oldhost -u oldusername -poldpassword olddbname | mysql -h newhost -u newusername -pnewpassword newdbname
This maybe a good option if your database is over 7MB in size. However, I prefer a more “hands-on” approach and migrated the database with PHPMyAdmin.
Exporting a database with PHPMyAdmin
Firstly, you need to export the database from the old site. Once you have logged in to PHPMyAdmin, selected the WordPress database on the left-hand panel and clicked the Export tab on the top right, there are a few options you must set in this page.
Underneath the section marked “Export”, make sure you have clicked “Select All” and in the radio button list below, make sure SQL is selected (this maybe already done when you arrive a the Export page). In the section marked “Structure”, check the box marked “Structure”. Within this section check boxes marked Add DROP TABLE / VIEW / PROCEDURE /, Add AUTO_INCREMENT value, and Enclose table and field names with backquotes. In the section marked “Data”, check the box marked Data. Within this section check boxes marked Complete inserts, Extended inserts and Use hexadecimal for binary fields.
Finally, check the box marked Save as file in the bottom panel and click the radio button with compression as None. Then click Go bottom right and go and get yourself a coffee.
Here is the complete panel to export or back-up and WordPress database in PHPMyAdmin:

This is the same procedure as when backing up WordPress databases. You can get a plug-in to do this for you but as this is for a new WordPress website, I thought it was better to export it this way.
Importing a database with PHPMyAdmin
Secondly, you need to create a new database on the new server and import the database you just exported.
I created a database with completely different name, username and password but you could be clever and create one with the same names and passwords as the old one which would mean you wouldn’t have to change these in the wp-config.php file later on.
In order to import the old database into the old one you need to open PHPMyAdmin for the new database that you have just created.

Click the small
SQL icon, select Import Files from the resulting pop-up window, click Browse, select the file from your computer that you’d downloaded from the old site, and then click Go.
Editing the wp-config.php file
If the database imported still has the old website URL in it, you need to add these lines to the wp-config.php file:
define('WP_SITEURL', 'http://www.wpblogtalk.com');
define('WP_HOME', 'http://www.wpblogtalk.com');
I also had to change the database name, database username and password in the wp-config.php file to the settings of the database I’d just created.

At this point you can have a look at the new site and click through a few links. There’s still plenty more to do, though.
Search and Replace plugin
Meet your new friend, the Search and Replace plugin. Install this plug-in on your new site to change all the mentions of the old domain and change them to the new one. There are two places you can do this in the plug-in’s options page. I performed the search and replace in both.
If you search through all your posts now you will find all the internal links and image paths are using the new domain.
Check the site
Have a good look through your new site, checking that all is as it should be. Here’s a few things that I needed to do:
- Change image paths and internal links in the text widgets (for some reason these don’t get picked up by the Search and Replace plug-in)
- Change the logo in the header
- Create a new Aweber list for email subscriptions
- Re-brand e-books offered for download on the site
- Change the download page in Clickbank for a premium product
I actually found that these actions took the most time of the whole process!
Re-direct old site to new site
This step is absolutely essential!
You now have two sites that are identical in content – a bit of an SEO no-no. You need to set up a 301 re-direct from the old site to the new site. Put this in the old site’s .htaccess file – which you will find on the root of the site.
Redirect 301 / http://www.wpblogtalk.com/
That’s all you need! That will redirect any URL in the old domain to the equivalent page in the new site.
Final steps
Finally, I performed these following steps:
- delete the files and database of the old site (keep that all important .htaccess file though!)
- change the feed URL at Feedburner
- set up a new Google Analytics account
- set up a new account at Google Webmaster Tools to monitor how many links are indexed and register the sitemap
- create a new robots.txt to point to the sitemap
- create a new email address for the site and make sure the content form points to it (and forward emails from the old email address for the site to the new one)
Moving a WordPress website from one URL to another
Here is a video I made for your viewing pleasure concerning all the main points of copying files and databases, setting up the new WordPress site and redirecting the old site to it.
You’ve made it to the end of the article now!
I hope that helped someone. Please let me know if you do it differently or if you’ve had a problem with this operation in the comments below. And, if you’ve enjoyed the article, please don’t hesitate to vote for it down below!






Another informative article Rob. As you will know, I’ve done this a couple of times this year by splitting my main blog into 3 URLs. The main issues I faced was importing the databases. They kept going wrong, and only trial and error resolved the issues (the database migrations just wouldn’t complete for some reason).
I still have a few issues with 404s and missing images, but apart from this, all the steps I took are similar to your examples.
Thanks, Andrew. Yes, I had to do the importing of the DB twice before it worked. As you say, it was trial and error. Good to know we followed similar procedures.
So, there’s Andrew Kelsall, DesignSoak and what’s the third?
Great – really great – article. I surfed in from LinkedIn and was very glad I did. I want to move to another host and feel a bit better about it after reading this!
Have you ever moved a Moodle installation?
Hello, Michelle, it’s really not as bad as all that. No, never moved a Moodle!
I’ve just registered by a WordPress backup site (blogVault) which says you can use its automatic restore to simplify migrating a site to a new URL. It would be useful for me to have seen your instructions for people who have this backup.
Oh well, Lydia, hopefully this will be useful for next time!
I’ve moved to a new domain but lost 80% of my traffic. Why would this happen?
Brad, sorry to hear that. I lost traffic, but only about 20% of organic traffic. Did you do the 301 redirect from the old domain to the new domain?
Thanks for the reply Rob
Yeah i redirected all URL’s from old to new domain
Its taking 24 hrs to add 200 keywords and i have around 8000
I think the PR and Domain authority on the new domain will take time to get back to where i was before the change and then SERPS positions should be the same if not better
There’s no way anyone keeps 100% of their SERPS positions after changing domains
Nice blog. I like the setup, colors fonts etc
I agree with you: you won’t keep 100% of your SERPS positions after changing domains and the PR and Domain authority on the new domain will take time to get back to where it was before the change.
I should post again about how the Analytics compare before and after the change. The site I changed was only 6 months old – I would hate to do this to a 6 year old site!
Thank you for the kind words about my blog, Brad.
I took up a domain http://www.mbsb-online.my about two years ago and today it is ranking well on the google first page for the keyword MBSB and getting lots of traffic in Malaysia.
Yesterday I got a warning from MBSB, a publicly listed company about I should take down my website and domain immediately, because it is illegal to have mbsb in the domain name.
I am now planning to to buy a new domain, say http://www.99peratus.com. And then copy and paste the identical content from the old websites to new website. Hence the new website will have almost identical structure content as the old website. Then I will 301 redirect page to page from old website to new website. After that I will delete all the content in the webpage. Meaning the old websites will still have the web pages as before but they are all empty.
Am I doing the right thing ?
Sincerely hope to get some light for the above issue.
Hello Wilee, if you do everything you state in the comment you are doing it correctly.
However you had MBSB in the old domain name and you won’t have it in the new domain. I experienced about a 20% reduction in organic traffic after the move (I’m getting more now). But you will maybe lose more traffic than that as the keyword that was in your domain name will suddenly disappear and Google will notice that.
How much will you lose? I’m not sure. I’m sorry I can’t be more specific.
Simple is simply genuis. Many thanks for making a daunting task so easy.
Wow, thanks, Meron!