The domain move is complete – you as a reader probably have not noticed it all being well. All razorshine.com links should forward invisibly to the new riazkanani.com domain (in technical terms, the razorshine.com is using a 301 permanent redirect) and the existing feed should still work 🙂 I would lov it if you could update your feed to this URL instead though: feeds.riazkanani.com/riazkanani
So how did I do it? Well there were plenty of options out there on the web for how to do this, but I think I have found an efficient way to do this:
- BACKUP YOUR FILES AND DATABASE FIRST!!
- Download the files and edit the wp-config.php file in the root directory. Change the database details from the old to the new domain. Note, if you are creating a new wordpress installation inside the same database, you will need to just change the table prefix (makes life harder later so avoid if you can!).
- Copy all your files from your old domain to the new domain.
- Backup and export your old database.
- Create a new database and import the old content into it. (Note: if you are using one database, you will need to edit the file you exported and rename each of the tables to the new prefix – I really do not recommend this option though!).
- Edit the wp_options table and change any occurance of the old domain to be your new domain (I just found siteurl, fileupload_realpath and fileupload_url).
- I didn’t seem to catch everything in the tables, so go to settings>general inside your WordPress admin area (newdomain/wp-admin) and make sure all the values there show the new domain.
- Finally 2 options:
a. Download the Moving Your Blog plugin and install it on your old domain. Change the settings for this plugin to point to your new domain. Now any links coming into your old domain will revert to the new one. You can now delete all the old plugins, themes etc and reduce the WordPress installation on the old domain to be its most basic. This method does mean though that you need to keep an installation of WordPress running on the old domain.
b. Add this line to your .htacces file (should be in your wordpress folder): RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] after the RewriteEngine On line. Warning: This will keep the old domain in the address bar after the redirect.
- Go update all your links across the web 😉
That is it, except in my case (and possibly yours) where I have 2 additional services I use on my blog. Feedburner and 3rd party comments. Here is what I did:
Feedburner: I changed the existing Feedburner feed url to point to my new domain. That meant existing subscribers will get the new content from the existing feed URL. But, as I did not want that URL long term, I also created a new feed at feeds.riazkanani.com/riazkanani and set that up as my new feed on all my links on the blog. The downside to doing this is slowly you will have to persuade people to move to the new one!
3rd party comments: I have used both Intense Debate and Disqus in the past. The good news is they both sync comments back to WordPress so when I moved the database all the comments came with me inside my WordPress database. If you want to use the same commenting account as before, it is as simple as reactivating whichever of the plugin you want to use. Again I wanted to use a different account (why make my life easy!) so I changed the settings and set it to import back to first Disqus (only 20 comments synced) and then after switching off Disqus, I tried Intense Debate which seems to just be sitting there doing nothing. I guess I will have to update this post once that completes 😉 Disqus have offered to manually import the comments. It would be nice to know why they didnt import in the first place though!