Shards of Consciousness

Changing Domains for a Wordpress Blog

When I first announced that Shards of Consciousness had its own domain, Renee, from Small Dogs Paradise said she was going to make the switch soon with a couple of her blogs, and asked for a post on how to do it. I waited until I was finished, because the devil, as they say, is in the details.

There are several ways you can move a Wordpress blog from one domain to another. When I first started to move my domain, I found several how-tos on the domain moving process itself. However, none of these were clear enough for me. And none of them covered all the issues involved in changing domains.

There are six main aspects of moving a Wordpress blog from one domain to another.

  • Your database
  • Your Wordpress installation
  • Your links and relationships
  • Your email
  • Your advertising
  • Marketing

Moving A Wordpress Blog to Another Domain

  1. Back up your current blog and either download or email the backup to your harddrive. The backup plugin that comes with Wordpress is excellent for this.
  2. Copy your current Wordpress installation to your local hard drive. Use your favorite ftp program for this. I like FileZilla. Actually I use FileZilla Portable, a portable version of FileZilla.
  3. Buy your new domain. If you are changing hosts, get a hosting plan.
  4. Make a copy of the local version of your database, then edit your copy. You need to do three things here.
    • Delete the xxx_options table definition and data, the xxx_users definition and data, and the xxx_usermeta definition and data. You won't need them. Here, xxx stands for the actual prefix of your Wordpress database tables.
    • Do a search and replace, replacing all instances of your old url with the new one. For example, I replaced all instances of www.rdcsoft.com/articles with www.shardsofconsciousness.com.
    • If your email address is changing, replace all instances of your old email address with the new one.
  5. Either create, or have your new host create, a database for you on your new domain. Make sure you get the ip number (server url) of the new database, it's name, and it's password.
  6. Edit the local version of your Wordpress installation.
    • Change your wp-config.php file. This file is in the root of your Wordpress installation. Enter your new database name as the DB_NAME value. Enter your new database user name as the DB_USER value. With my host this is the same as the database name. Enter the password as the DB_PASSWORD value. Enter the ip address as the DB_HOST value. This is complicated enough as it is, so don't change your table_prefix value.
    • If you have your url hard-coded anywhere in the templates of your theme, (you shouldn't have), change the old url to the new one.
  7. Upload your Wordpress installation to the new host using your ftp program.
  8. In your browser, go to [url]/wp-admin/install.php, and run the Wordpress installation. [url] stands for your new domain. This will create the tables for your new Wordpress database.
  9. Log in to Wordpress at your new domain.
    • Enter all the users that you used to have. Remember to put your new url and new email address in wherever the old one was.
    • Set up the General, Writing, Reading, Discussion, and Permalink options exactly the way you had them before. The most important of these is the Permalink options. If these are changed, your new installation won't work. Make sure the permalinks are set up exactly like the old blog.
    • Enable the plugins that you had enabled on the old blog. If any of these had options to set up, set them up like you had them on the old blog.
    • Go to the Presentation tab and select your old theme as the theme to use. You already edited it on your local harddrive, so you shouldn't have anything else to do here.
    • Back up the new Wordpress database to your local harddrive. You just did a lot of work, and don't want to lose it if something happens.
    Log out of Wordpress
  10. Go to your MySql administration panel. My host uses phpMyAdmin. Your host may use something different. You are now going to import the edited version of your old Wordpress database.
    • Select the database that you had created to hold your new blog.
    • Chose the option to Import a database.
    • Navigate to the edited version of your old database and import it. If everything goes well, your administrator panel will tell you things were successful. If the import failed, you most likely screwed up editing your old database. Delete the old edited version of the database on your harddrive, edit it again as described above, then try to import it again. I had to do this three times before I got it right.
    Sign out of your administration panel and navigate to your new domain. Everything should show up just like it was on the old domain.
  11. Take a short break to celebrate. You moved Wordpress from one domain to another! :-)
  12. Navigate to your new blog. Cruise around. Check your links. All of them should work, but if you didn't do the url replacement correctly or set up your permalink structure correctly, they won't. If there is a problem, log back into Wordpress, check the permalink structure and make sure it is correct. If the problem still isn't fixed, go to the Manage tab, select Posts. Sometimes internal links may not have been updated properly. Do a search on the old domain name and make sure it doesn't appear. Then do a search on the new domain name. Make sure there are no extra directories placed in the path of the links. If there are, you will have to change them individually.
  13. If you use Feedburner, sign in to your account there and update the path for your feed to the new domain's feed. With speed, no one will notice that you have a new domain. The longer you take to do this, though, the more subscribers you will lose.
  14. Your blog should be working properly now. You need to notify everyone who has you in their blogroll. I used Technorati to find everyone I could, then emailed them to ask them to update their links. Your can ask them to update links to articles in your blog, but I wouldn't. You're already asking them to do enough work. Anyone who does change a link in their blogroll or articles, thank them - profusely. They're doing you a favor that needs to be acknowledged.
  15. If you have a new email address, your next task is to change it wherever you can. Any forums, advertisers, correspondents, they all need to have the updated email. Hopefully you have a list of everywhere that needs changed. If so, use it. If not, put the change request in everywhere you can remember. One thing to watch out for is when you comment on other blogs. If you've commented on that blog before, the comment form will be filled in with your old email address and domain name. Make sure you replace these with your new email address and domain name.
  16. Submit a new sitemap to Google. This will decrease the amount of time it takes to get indexed. I use the Google Sitemap Generator plugin to generate a sitemap. Within a few days after submission Google should have your new domain indexed.
  17. Finally, your advertisers. They need the updated domain and email, also.
    • If you use Paypal, add the new email address to it, and make it your primary email address
    • If you have private advertisers, notify them directly
    • If you use Adsense and your email has changed, email them and request a new email login address. They'll be happy to change it
    • If you use Google Search, get new code for it and replace your old Google Search code with it. Otherwise, people will be searching on your old domain, and not your new one. (Thank you Gleb, for noticing this one!)
    • If you use Text Link ads, you will also have to email them to request a new email login address. While you're at TLA, don't forget to change your Paypal email if that is how you get paid. You will also have to submit your new domain for advertising. Don't expect much here, yet. The new domain will have no Page Rank, and won't be in great demand, so it may well be turned down. After your site gets popular again, resubmit it. You will probably be accepted.
    • Any affiliates, you will have to deal with on a case by case basis. Just make sure they have the information they need - your new domain, if necessary, and your new email address if it has changed.
    • If you use Amazon and have changed your email address, you will need to change it with Amazon. I still haven't got this one done. They make it more complicated than it needs to be. I've tried four times and haven't got it done properly, yet. Your store and Amazon links should still be working properly, though.
    • I use Google Analytics for stats. I had to add the new domain to it, and get new code. I don't know how other stats providers work. Just make sure stats are being collected on the new domain.
  18. The last item is marketing. You have a new domain, and will need to market it like it is a new blog. Claim it on Technorati. Submit it to the search engines. Get the word out about your new home.

Conclusion

That's it! Eighteen steps with a lot of substeps to move your domain. It isn't something to enter into quickly. It isn't something to do overnight. You will lose any Page Rank you have. You will disappear from the search engines for a time. Your Technorati links will fade away. You will losing advertising income for a longer or shorter time since you're not showing up in the search engines. Generally, don't move your domain if you don't have to or if the long term benefits don't surpass the short term pain of the change.

On the other hand, your Alexa rank should increase quickly. People will be good to you and update links so they point to the new blog. Time will get the blog back up in the search engine results.

It took me about a week and a half to complete everything. Much of the work I had to figure out as I went along. And I'm still not sure if I did everything. I don't doubt that I have missed something. But you have the benefit of this guide. You should be able to make the change in less time.

Have a great move!

2 Pingbacks to Changing Domains for a Wordpress Blog

13 Responses to Changing Domains for a Wordpress Blog

  • Let me the first to give you my heartfelt thanks!

    I use local wp to do template editing but never thought I could also use it to move the whole DB like that! Your #4 i - iii is my missing link.

    Without the detail steps you lay out, I might miss some of them myself. Definitely, one stop to solve it all!

    Thank you so very much, Rick! And thanks for the mention!

  • Excellent coverage, Rick.

    Man, even for a techie sort, there are steps that could easily be missed. You've detailed it out nicely.

  • You're welcome, Renee. If you hadn't asked, I wouldn't have thought to do this, so my thanks to you. I feel like an amateur at things like this, so have a hard time seeing how my experience can help someone else.

    #4 solved the hardest part at moving the blog database itself. I tried several of the methods I found on the net by trying to import my database into my local copy of Wordpress. I couldn't get any of them to work except this one, which I used when my Options and Users kept being screwed up. I then used it on my live version of Shards. I still don't think it's the best way, but it's the way that worked for me.

  • Hey Tony,

    Thanks for the compliment! You're right. There are a lot of steps that could be left out, and it's easy to do. Most posts I saw on don't cover anything from #12 on, but these things are as important as actually moving the blog itself.

  • Hey Rick--

    One thing that can help the transition if you still have hosting for the old domain name is to do a 301 redirect with an .htaccess file. This will help the search engines find the new domain with no penalties, and old links will redirect to the new address instead of getting 404 Not Found errors.

  • Under normal circumstances I totally agree with you, Steve. The redirect would avoid most of the negative effects of changing domains that I talked about.

    In my case, I let the domain lapse, and the registrar, Easyspace, is holding it hostage for close to $300 dollars, so I'll have to deal with the short term effects of the change.

  • OUCH!!

    I guess there's no real solution for that, is there?

    I meant to mention that I think you did a good job of stepping through the moving process. It can be tricky...

  • Ouch is right! If you read Shards of Consciousness has its Own Domain you will see how I managed to manifest in a convoluted way what I wanted to do anyway.

    The actual moving process is tricky. I worked on a local installation of the blog for a while before I finally got it right. And then there is remembering that moving involves more than just moving...

  • Fantastic! I'm adding this to my discussion on obtaining your own domain!

  • Thank you,Doug!

  • To have a successful move, you will also need to update your permalinks and any links that may be in your articles or pages. We released a plugin which does just this.

    Check it out at: http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/

  • The post does discuss updating the permalinks in item #4-2, but using a plugin would make life a lot simpler than manually editing the database. I wish it had been around when I moved. Thanks for writing it.

  • HI, Have a nice day.

    I have enjoyed all threads here during half hour. Some is right, but other is not right.

    If u want to get more domain infomation online maybe http://register-cheap-domain-names.com can give u some help.

    Best regards to u. Good Bye.

Add To The Discussion
A Little Info About You