I migrated my coldstreams.com blog to coldstreams.wordpress.com and the old web site automatically redirects to the new URL.
In theory, this process is simple – but getting it done right was complicated.
The hard part was getting the redirection to work for all cases. If you just want to redirect coldstreams.com to coldstreams.wordpress.com – that is easy!
But that redirects all references to coldstreams.com to the new URL.
- What do you do if you still want to access other directories on your old web site like coldstreams.com/thesis or coldstreams.com/public?
- If you have links on other pages that point to the old self hosted blog like coldstreams.com/?p=11074 you want those to still point to coldstreams.com and not the new URL. How do you do that?
The solution was to edit the .htaccess file on the Apache web server and implement a set of RewriteRules to translate some URLs but not others. Sounds simple but I am not a RewriteRules guru (never even looked at them before!) There is a lot of bad documentation available online plus forum Q&A that is wrong or insufficient. Getting the RewriteRules to work for me took hours of plowing through bad documentation plus trial and error.
Here I explain what I did. I hope it is helpful for your WordPress migrations!
Step 1 – Migrate your content
After you set up your account at WordPress.com, migrate your content from your self hosted WordPress blog. Log in to your Dashboard (wp-admin) control panel and find Tools | Export and under Choose what to export, select All content and then Download Export File (to your computer).
Step 2 – Import content to new WordPress.com blog
Log in to your WordPress.com account, click on My Sites if needed, to see the options listed down the left side. Select Settings and then on the tab at the top, select Import. Click Start Import on the WordPress import item to import your content from a WordPress export file. You’ll specify the file you downloaded from your own web site.
WordPress.com suggests it may take 15 minutes to import your site. In my case, it took about 3 1/2 hours! During the import process, WordPress.com fetches all of your referenced media files (like images) and copies those to WordPress.com.
Step 3 – Adjust any direct http references