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!



Monday, October 20th, 2008 at 9:04 am
“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?
Monday, October 20th, 2008 at 9:05 am
@ 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).
Monday, October 20th, 2008 at 9:34 am
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.
Monday, October 20th, 2008 at 10:38 am
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:
Tuesday, October 21st, 2008 at 1:26 am
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
Tuesday, October 21st, 2008 at 2:37 am
Wonderful post…
I never knew about the plugin to change the url. The other way might be executing some commands on database…
Stumbled…
Tuesday, October 21st, 2008 at 12:17 pm
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.
@ Pavan - Yes, the plugin made the move a TON easier.
Tuesday, October 21st, 2008 at 11:53 pm
Great post. If i change my domain name in future. I would you this post as the starting point.
Sunday, October 26th, 2008 at 9:42 pm
Thanks.But When I Import ,It is Too big and cannot import,says it is bigger than 2MB,SO,,,,,,,,,How to do that ..
Saturday, November 8th, 2008 at 5:19 pm
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
Tuesday, November 11th, 2008 at 3:46 am
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
Monday, November 17th, 2008 at 5:20 pm
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.
Tuesday, November 18th, 2008 at 5:41 pm
@ 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.
Wednesday, December 24th, 2008 at 3:43 am
Thanks for the information it will be handy for future reference!!!
Thursday, January 1st, 2009 at 10:02 am
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
Friday, February 27th, 2009 at 9:12 am
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?
Friday, May 8th, 2009 at 8:41 pm
A bunch of thanks to you.
Monday, May 11th, 2009 at 8:59 am
Does this also import your pages?
Monday, May 11th, 2009 at 3:06 pm
Yes it does
Monday, May 11th, 2009 at 3:08 pm
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?”
Monday, May 11th, 2009 at 5:44 pm
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.
Saturday, May 23rd, 2009 at 1:38 am
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
Saturday, May 23rd, 2009 at 11:09 am
do you also have a specific procedure for “Download Your wp-content Folder using FTP ”
thanks a lot…
Saturday, June 6th, 2009 at 8:26 pm
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?
Friday, June 12th, 2009 at 10:15 pm
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?
Monday, June 29th, 2009 at 5:39 pm
Great post
Really useful
I move my blog to a new domain easy
Trackbacks/Pingbacks
Leave A Comment
Become one of our
Featured Sites
Recent Trackbacks
Contributing Authors
Archives
Extras
WordPress Hacks Copyright © 2007-2009 | An Apricot Media Website
Template by StudioPress | Custom Design by Kyle Eslick and Blog Design Studio
RSS Feed Email RSS