Moving a WordPress site from one domain to another is not a very difficult task. In fact the switch can take between 10 to 15 minutes. It all depends on your connection speed and the size of your database. The fastest way to move your site could be accomplished by following the next steps:
- Backup your database
- Download fresh copies of the plugins you want to use in the new server (if your blog is only a few months old you might be able to skip this ste
- Export all posts from database (you can use phpmyAdmin or similar)
- Export all comments from database (use same tools as above)
- Install fresh copy in new domain
- Import posts from previous database
- Import comments from previous database
- Upload and activate plugins.
Thats it, now the tricky part for me was that I have been posting on my previous server for 5 years and I didnt want to loose those 2 or 3 current readers so I wanted for them to have a smooth transition as well. One option was to forward all the posts to 301 (Moved Permanently).
That is an easy solution but I had a dilema. I want to keep bloggin in my current blog and make sure that I dont loose visitors or search engine ranking. So in order for me to do that I had to basically forward every one of my current posts to the new domain, but that would mean that I had to go and make a very long .httaccess with a list of each one of my posts for the past 5 years.
[THE PLUGIN SOLUTION]
Another idea was to use a plugin that would forward any post from my “old” blog to the “new” blog. Again this could have been good but now ALL posts would be forwarded, even the new ones or even typing the original site would send me to the new site, sot that was a big issue as well.
[THE LETS EDIT THE TEMPLATE SOLUTION]
The other option (which I partially implemented) was to add a statement on the template to make sure that if the user hit a post with a certain date before the date the new site went live, they would be sent to the new site. That worked for a bit until I realized that pages, categories, archives, back and forth buttons were causing some issues.
[THE 404 SOLUTION]
So the last solution was to trigger a 301 on a 404. That means that if the user goes to:
http://www.helmutgranda.com/page-that-doesnt-exists
They would get sent to the new site:
http://www.superloaded.com/page-that-doesnt-exists
So now I have the best of both worlds, I am not sure at this point for how long I have to keep forwarding my users but I will leave the option for at least couple of months and then just throw a “we’ve moved” message with a referral to the new site.
The option of using a date to forward users was a nice idea and I am considering to create a plugin out of that but not sure at the moment.