Moving Your WordPress Blog To A New Domain

Many blog owners are scared and hesitated to move their blog to another domain because they fear to lose their visitors, downtime and other complications. I will show you now how to get rid off this fear and how to avoid problems while you moving.

First of all, make a backup of all your data in your database and your customized themes and other files.

  1. On your new domain, create an index.php, with the function header() , to let the search engine know, that something is coming soon, visit us again.

    Alternatively you can use the Plugin Wartungsmodus or Maintenance Mode.
    From now on you can work, without to be worried about search engines, on your website.

  2. After that, you import your data into the new database and upload all files.
  3. Adjust the wp-config.php accordingly. Open the file in your editor and add following data:
    define('WP_SITEURL', '');
    define('WP_HOME', '');


    I suggest to this in every other blog too. You save a request to the database and it improves the performance of your installation. Please check the correct definition, even a wrong / can deny access to your blog for visitors.
    After you add these definitions, don’t forget to check off both fields in your settings area. See screenshot:

  • Now the installation of WordPress starts with the same database files. The new address get pulled out of the both constants.
    Note: if there is a Plugin or modification to cache active, please deactivate it.
  • After the new blog is running, install the Plugin Search & Replace, which helps you to find in old posts the old URL and replaces it with the new one.
  • Now check all preferences in your blog, do it accurately.
  • Everything OK? Then delete the index.php which you created in the beginning. Searchengines are having access now.
  • Add to your old blog an .htaccess file and put in:
    Redirect 301 /blog/
  • Now you can delete all files and the database on your old blog.
  • If you have an account on Feedburner, you have to change the URL to your new blog, so your current reader will still get your feeds. But don’t change your original feed!
  • Bonus Tip:

    Acquire just your domains at another cheap but reliable provider, where you can change the DNS settings easily whenever you change to a new host. So you won’t have any troubles, if your old provider don’t let your domains transfer to your new host. You just have to change the DNS settings and don’t have to hassle with your host provider.

    That’s about it, good luck with your move! And if you have further tips, let us know!





    11 responses to “Moving Your WordPress Blog To A New Domain”

    1. Binny V A Avatar

      > make a backup of all your data in your database and your customized themes and other files.
      Remember the uploaded files as well – I almost always forget them when backuping.

    2. […] der nur zwei Extra-Zeilen in der wp-config.php benötigt. Eigentlich geht es darum, wie man mit einem Blog auf eine neue Domain umzieht, […]

    3. Susan Avatar

      I had to use a 301 redirect for my domain and it took about an hour to get things setup, tested and working working properly. I thought it would take longer, but I was amazed it didn’t.

    4. Alex Avatar

      Hey Binny V A, thanks for the added tip, many people forget about it, so did we in our post 😉

      Congrats Susan, glad it worked out well.

      Thanks kushal, I’m sure many Bloggers will appreciate that.

    5. Craig Farrall Avatar

      Wow, this is fantastic.

      I owe you so much for this post, I am soon to be changing my blog to a new domain name, and I was just going to to have a redirect on my blog, but this way is fantastic.

      I owe you one 😉

      Keep up the great stuff 🙂

    6. Alex Avatar

      No problem Craig, if we ever will meet in a bar somewhere in the world, you know who is paying the bill 😉

    7. Susan Avatar

      I think it’s great that it can be so easy to move a wordpress blog.

    8. […] Moving Your WordPress Blog To A New Domain – backup of all your … […]

    9. Pace Avatar

      Thanks! I just moved my blog to a new domain name and these instructions helped. I ran into a bit of trickiness because I wanted to work on the new blog and leave the old one up and running, but I was able to modify your instructions and figure it out.

      Thanks again!

    10. […] see if any of my followers had a suggestion I did some good old-fashioned google research, lol. And this site provided me the missing step, did the fix in my wp-config.php file and voila! For now, at least, it’s fixed. Now I get to […]