Last Friday I announced that our site has moved from Hack WordPress.com to where we are now, at WPHacks.com.   Towards the end of the post we got a lot of positive feedback from people wanting to know what all was involved with the process, so I’ve decided to attempt to document it here.

Here are the initial steps you’ll want to take when moving to a new domain name.

Existing Domain:

  • Export Your WordPress Posts – You can find the Export option under the Manage tab in your WordPress dashboard.  You’ll want to save the file somewhere on your hard drive where you can find it a little later.
  • Download Your wp-content Folder – This step requires FTP access.  You’ll want to copy over your wp-content folder on to your hard drive or place it somewhere you can find it later so that you can upload it to your new domain.  This should grab all of your existing plugins, themes, uploads (pictures), etc.   You’ll also want to download your favicon and Robots.txt file (if you have either).
  • Sub Domains and Sub Directories – This won’t apply to everyone, but if you’ve set up any sub domains or sub directories for your blog, you’ll want to grab the same files from them as well.

New Domain:

  • Install WordPress on the New Domain – This can be done manually or via Fantastico if you have CPanel.
  • Upload Your wp-content Folder – This requires FTP access to complete.  Just override the existing wp-content folder from your fresh WordPress install.
  • Import All WordPress Posts – You can find the Import option under the Manage tab in your WordPress dashboard.  When it asks for the import file, use the one that was exported and saved on your hard drive earlier.
  • Activate Your Theme & Plugins – Head into the Design and Plugins tabs and make sure you have the same theme and same plugins activated as the old domain name.
  • Update Your Settings to Match the Old Domain – Update all of your settings to match the old domain, including all of your plugin settings you just activated.
  • Inspect Your Theme – View your theme with your plugins activated and settings in place to ensure that everything looks like it matches the old site on the new domain.  Test some of the functionality as well to ensure everything is working properly.
  • Upload and Run the Update URL’s Plugin – The Update URL’s WordPress plugin is brand new (just came out this month) WordPress plugin and the timing couldn’t have been more perfect for me!  Once activated, simply enter your old domain URL and the new one.  It will go through all of your old posts and update the domain part of the URL with the new one, and it only takes a matter of seconds.  Note:  I won’t update anchor text, only the domain in the URL.
  • Repeat Steps for Sub Domains and Sub Directories – Upload and setup your sub domains and sub directories using the same steps above.

Domain Move Troubleshooting:

  • For some reason, since WordPress 2.5, the export/import feature of WordPress works great but sometimes causes problems with an unresponsive script error whenever you access the Write panel.  I will be publishing a post tomorrow that explains how to fix this error, so make sure you are subscribed to our feed.

Once the move is completed and everything seems to be working well, here is a mini checklist of extra things to do before making the move official:

  • Update Your Feedburner Feed – You need to edit your feed details in your Feedburner account with the new domain’s source feed (example: http://yourdomain.com/feed/)
  • Update Your Email Address – This one is optional.  Setup an email account on your new domain name (for example, I setup Kyle AT WPHacks DOT com for the new site).  I recommend using Google Apps which makes it really easy and lets you take advantage of the Gmail spam guards that Google has in place (plus all of the other Gmail features).
  • Update Your Gravatar – This one is optional as well.  Log in to your Gravatar account and add the new email address you just setup.
  • Update Your PPC Campaigns – If you purchase PPC advertising with AdWords, Yahoo, or whoever, you’ll want to update the destination URLs.

Once you’re done, all that is left is to go to your domain registrar and forward the old domain to the new domain (also known as a 301 redirect).   Depending on your registrar, this is usually really easy and self-explanatory.  I would also wait 6-12 hours to make an announcement on the new domain name so that the DNS can resolve at the new domain name (it can sometimes take up to 48 hours).   Depending on your web hosting, you may also be able to do the forward there to avoid this problem.

Doing this will cause all links to your old domain name to be redirected to the equivalent URL on the new domain name (assuming you use the same URL structure on the new site).   It will also let Google and the other search engines know you have moved.  Usually within a week, depending on the search engine, they will have gone through and updated their index with the new domain URL’s.

This of course means that you shouldn’t use any human traffic, but you will take a hit when it comes to your search engine rankings.   This is because the links are pointed towards the old domain name, so when Google determines your rankings, they will see the new URL has zero backlinks.  This is why it is beneficial if you can get people to update the links in their sidebars or posts to the new domain URL.

Any questions?  Need clarification on anything?  Please let me know in the comments below!

Want automatic updates? Subscribe to our RSS feed or
Get Email Updates sent directly to your inbox!
Tweet This | Digg This | Stumble it | Add to Del.icio.us | | Print This

Kyle Eslick

Kyle Eslick is WordPress enthusiast who took his passion for WordPress to the next level back in 2007 by launching WPHacks.com as a place to share hacks and review WordPress-related products. You can learn more about him by following his personal tweets here.

There Are 66 Responses So Far »

  1. hd-J says:

    “I recommend using Google Apps which makes it really easy and lets you take advantage of the Gmail spam guards that Google has in place (plus all of the other Gmail features). ”

    What do you mean with that? Is there a possibility to create a gmail account with your own domain name? For free?

  2. Kyle Eslick says:

    @ HD – Absolutely! It is a free service Google provides. Do a Google search for Google apps. This is how I manage all of my email accounts (one for each domain name).

  3. Andrea_R says:

    I’ve found some issues with Export on larger and/ or multi-author blogs.

    I prefer to do a database export and mess around with the SQL.

    If you have two web accounts on one server, you can just go in via ssh and copy files from one folder to another.

    :D

  4. alexnull says:

    I am with Andrea_R, i have experienced problems with the export for a blog with > 1000 posts.

    If I have to, i will prefer a database export.

    You can find additional information here:

  5. Mehmet says:

    The best way to take backup is get it directly from mysql. I agree with Andrea, but I still go for the export link to download the xml file first. If it works fine, no need to go a mySQL backup.

    By the way, if your xml file is bigger than the allowed file size, you can compress it with Wingzip

    • johan says:

      Hi Thanks for sharing. When you compress the XML file it becomes a gz file. Are you saying that I should import that? How will it extract? Thanks Johan

  6. Pavan Kumar says:

    Wonderful post…

    I never knew about the plugin to change the url. The other way might be executing some commands on database…

    Stumbled…

  7. Kyle Eslick says:

    I think moving your MySQL database is a good method as well, but I think there can be a lot more problems this way for someone who isn’t comfortable moving databases. This way there is less chance you will screw up either site. :mrgreen:

    @ Pavan – Yes, the plugin made the move a TON easier.

  8. Nihar says:

    Great post. If i change my domain name in future. I would you this post as the starting point.

  9. RocyHua says:

    Thanks.But When I Import ,It is Too big and cannot import,says it is bigger than 2MB,SO,,,,,,,,,How to do that ..

  10. mick says:

    WP DB manager is pretty fast and easy to handle backup and restore DB, I prefer use this plugin instead of wordpress export/import features

  11. sheena says:

    this is so useful, but unfortunately i am a fool when it comes to the internet. basically right now i have my wordpress in a subdirectory (www.sheenasays.com/ramble) but i just deleted the rest of the site and want to move the blog to http://www.sheenasays.com.

    i am really nervous that i am going to lose everything, is there a simpler way to move wordpress from a subdirectory to the main site??

    thanks a lot

  12. Eric says:

    This didn’t work for me. The export was in XML format and the import asks for a WXR file… I’ll try a database update instead.

  13. Kyle Eslick says:

    @ RocyHua – When you import, it only checks for new posts so you may have to run the import several times to get all your posts imported. Some web hosts have a limit on scripts being run, so if it takes more than 20ish requests, you’ll have to contact your webhost and get a reset.

    Something similar to that happened on my original blog I started a couple years ago which had almost 1,000 posts.

    @ Mick – Great point! I suppose a database restore could do the trick pretty easily.

    @ Sheena – I’m not sure it is a guide necessarily, but I did write about that here.

    @ Eric – I’m sorry to hear this method didn’t work for you. When importing, did you select the WordPress option? When I do this it asks for XML. Anyway, it seems many people favor the database move, so that may work better.

  14. p@r@noid says:

    Thanks for the information it will be handy for future reference!!!

  15. Rich says:

    Thanks for the info. I’m working offline at the moment and when online, will probably need to move within 6 months so will follow the tips here.
    Many thanks
    Richard

  16. James says:

    Does this mean that prior to the redirect, you actually have both sites up with the same content? – Not that that is a problem.

    If that is the case, do you really need to download the wp-content folder, since your existing blog is effectively a temporary backup? Can’t you just copy it from one directory to the other with the same results?

  17. Gagan says:

    A bunch of thanks to you. :)

  18. scott says:

    Does this also import your pages?

  19. scott says:

    Great! Just did it. I haven’t enabled the “Update URL’s Plugin”

    The only thing I saw missing was my image/media library. Will this be fixed when I implement the “Update URL’s Plugin?”

    • Kyle Eslick says:

      No, with the image/media stuff, just download that folder from your old site and upload it in the same spot on the new domain. :)

      Then run the update URL’s plugin after doing this.

  20. I bought a domain and webhosting plan, and I am planning to follow the procedure in this post.Thanks for this. :-)

    Although my worry is, if i transfer my wordpress blog to a new domain and hosting, my page rank and hits will be back to zero. Is this correct? Is there a way I can retain the hit counts and page rank?

    thanks a lot,
    onin

  21. do you also have a specific procedure for “Download Your wp-content Folder using FTP ”

    thanks a lot…

  22. Thanks for an informative post. Our team has had great success with our wordpress blog. The IT department wants to move it on to our CMS, abolishing the wordpress platform. We are concerned this move may have a negative and lasting impact on our SEO.
    What are the possible effects?

  23. Steve says:

    I have over 1400 domains and I am starting to develop them with WordPress … I want to take the setup I have at OrlandoMagicGameDay.com and clone it to multiple add-on domains (Cpanel is available) … I want to keep themes and plugins same for all … once cloned I will delete the content (RSS feeds) and enter new ones but I would like to avoid having to do the tedious setup of each site over and over … will this process work for me?

  24. Hans says:

    Great post
    Really useful
    I move my blog to a new domain easy

  25. Hi

    Followed your tutorial but I am only able to see my index page. Once i clicked any link on my index page, i will get error 404. Hope can i resolve this soon?

    Next is how to retain my search engine ranking? Already change my DNS and i believe that is tell WWW of my new address. Isnt that good enough for the search engines?

    Have read about permanent redirect 301. Must i do this and how to do that?

  26. ARCHER says:

    Great tutorial.
    I’ve done everything, and works fine.
    BUT, urls in custom fields are not changing with the Update URL’s WordPress plugin. I’ve also tried the Search and Replace plugin, and still no success.
    Any help?
    Thanx in advance.

  27. ARCHER says:

    Solved in the meantime. :)
    Thanx anyway.1

  28. Peter says:

    Hi,

    I try to move my blog in wordpress.com to a new domain. I export the XML file however I have one question:

    How can I upload my wp-content folder of my blog (subdomain.wordpress.com) to a new domain (www.domain.com)? How can I acess this folder via FTP access?

    Thanks.

  29. Thanks for sharing these tips mate! We are soon about to go live with WP as our new platform to showcase our Charlie Claw’s – Wasini Island dhow sailing, snorkeling, dolphin spotting and seafood dining here on Kenya’s Indian Ocean coast by Shimoni. First we created it locally on one of our office computers by installing XAMPP, but now we need to upload it to the web server. This info will help greatly. :-)
    We expect the new site to allow us to interact with our guests as well as bring in new business by effortlessly posting pages and posts with video, etc. Our old website has been such a headache.

  30. ps2 says:

    Thanks for the help and info provided here. I did run into a few glitches along the way but the stuff on this page helped me figure out where I went wrong.
    Thanks!

  31. Javs says:

    Hi I am wishing to transfer my domain and the post is quite useful But I am still feeling like I should not make any mistakes. Do this dont need backing up databases or editing config file etc.., Can I email you if I have any queries regarding this?

  32. Marodesign says:

    Awesome tip and SO easy to follow. I just transferred all post along with the images in a few minutes. I and redesigning a site and had to move everything to a new wordpress blog in the different location on the testing server! No glitches! Thank you!

  33. Kollyshow says:

    Hey Kyle,
    You are the bomb! I tried following your guides here and I got everything done under 30min. My blog used to have a sub-directory and I dont really feel ok with that, but with your guide I have been able to relocate it to the main domain.
    Thanks so much.

  34. Spewf says:

    Due to a horrible server I just switched everything over. The only things that don’t work are image galleries, custom fields, and NextGen-galleries. Any ideas why they wont display?

  35. Web Enk says:

    I have two clients, as well as my own blog to migrate to a new domain. This “follow-the-bouncing-ball” was awesome. Thanks Dude!

    Mark

  36. Martin says:

    Thanks a lot, very useful!

  37. Jane says:

    So how about if our domain is an add on and we’re going to make it a primary domain name? Do we follow the steps in this post (How To: Move Your WordPress Blog to a New Domain)? Is there significant value to doing this?

  38. George says:

    Been searching for this, thanks a lot!

  39. Geo says:

    Thanks worked Great!

  40. dean says:

    i moved one and now the uploads folder is inaccessible. i cant delet it change permitions or anything

  41. kapadokya says:

    Hi I am wishing to transfer my domain and the post is quite useful But I am still feeling like I should not make any mistakes. Do this dont need backing up databases or editing config file etc.., Can I email you if I have any queries regarding this?

  42. JG Ballard says:

    SO glad I found this, lifesaver!

  43. WORKED A TREAT !!

    Thank you so much for the information and guide guys !!

  44. Julie says:

    Hi,

    Thank you Thank you for this post. I actually googled up info on how to do this and a lot of information out there was painful to follow. I have just moved my first wordpress blog to a new url and server for a friends blog. Having never done that before your step by step instructions where brilliant!

    With the plugin to change the url, I didn’t seem to need that on my friends blog, all posts are showing as per her new url. Have I missed something with that please?

    • Eric Sawyer says:

      Thanks for the post, but I have an issue with the files not being able to be found after they are imported. I changed the permalink structure to match the orignal, but still there is a problem with all the nav, and other options linking to the right page, or finding them at all. Also, in the dashboard I found that while it showed 8 posts, there was no listing to edit them.

      http://www.yumafoodbank.org/wordpress

  45. Randy says:

    Terrific instructions. Worked like a champ, EXCEPT…I’ve got audio files that are embedded in posts. I moved the content from one domain to another on the same server. I just moved the “audio” folder from the old site to the new one. All went well. But the url to the mp3′s still shows the old domain name. I’m having to manually go through each post and change the url, then they work fine. Wish that url change plug in would change those, but I’ve not been able to make that happen.

  46. Khubab says:

    I have read a transfer/migration tutorial at http://www.nobleatom.com

    Here is the url: http://www.nobleatom.com/2010/03/safely-migrate-web-application/

    I have safely migrate my blog from one host to my new host.

    Thanks :)

  47. william says:

    Hi, I moved my blog recently using your instructions, but noticed that right and left widgets (i.e. twitter follow me, google, amazon affiiate links, etc) did not move over. Have I missed a step, or is this a manual procedure?
    Thanks,
    William

    • william says:

      One other thing, my permalinks have all changed to numbers, although I was using custom structure=”/%postname%/” setting in my original blog, and changed the setting manual. Is there any way to fix this? Do I have to re-migrate?

  48. Adal Design! says:

    I’d love to do the 301 redirect, but it seems that with WordPress’s canonical URLs, redirects create infinite loops that drive me crazy!

  49. Mark says:

    What about comments etc?

    Because you don’t mention taking the MySQL databse to the new domain?

    I’m guessing this tutorial is flawed?

    Thanks

    • Kyle Eslick says:

      Hi Mark,

      I just completed this process once again less than a week ago and everything went fine. No need to move the database and the comments will be included with the export/import feature built into WordPress. :)

  50. Buy Backup Buddy from the gurus over at iThemes. It’ll solve all these issues.
    NOT an affiliate link…
    http://pluginbuddy.com/purchase/backupbuddy/

  51. Roger says:

    Thanks for this guide, Kyle. It helped me a great deal in migrating a client’s site to a new domain. The Update URLs Plugin worked really well.

  52. Greg says:

    Thanks. Nice checklist!!

  53. Jeremy says:

    Good Morning Kyle, Just wanted to echo the thoughts of the majority of the posts and thank you for the article.

    Just moved my site, http://www.incompletegamer.com to a new host.

    The guide was simple and worked a treat.

    While I didn’t change domain names, I still needed to tweak my custom permalink settings to ensure they were identical to their state before the move.

    Many thanks,

    Jeremy

  54. Jackson Lo says:

    Great post! Very easy to understand and simple to follow, this should be ranked #1 on Google when people search for moving content from one domain to another using WordPress.

    Cheers,
    Jackson

  55. Sarah says:

    I went through the process of moving the test site I had created in a subfolder as not to interfere withe the live site into the main folder for the url and everything works find, except now any new plug ins I download don’t work correctly. I can instill and active them, but they don’t actually do anything when I try to use them – can you help?

  56. Pritush says:

    thanks for your tips, i have successfully moved my blog. But that update url plugin doesn’t seems to be working

  57. aftab alam says:

    great post, i am looking same for my own wp shift from subdomain to new domain root.
    i need to know that where to add the plugin to check the posts… in new or old installatiion?

    thanks in advance.

  58. aftab alam says:

    i follow the guide as you wright.

    posts imported, during the import process, wp asks for import the images etc. i skip that and all images are coming from old domain. the images are over 2000+
    and how can i manage that?
    should i download and reupload or how to manage?

    thanks for nice post and reply.

Trackbacks/Pingbacks »

Tweetbacks »

Leave a Reply