I’ve been thinking about Moving my personal Blog for some time. It’s in a sub-directory, which is untidy looking to say the least, and perhaps that might affect SEO, or page ranking in some way. Anyway, what really spurned me on was an upgrade.
For some reason, upgrading to WordPress 2.5 worked on some blogs, and not on others. The Visual Editor wouldn’t work on some, and at The Eye, worse still, the Video plug-in that I use quite often wouldn’t work at all. I know they’ll be an update to that plug-in but I can’t wait. I’m trying to drive more traffic to the blog, not away!
So, to that end, I’ve moved The Eye to a brand new home.
Here’s what I did.
- I used Fantastico at my host to install a new copy of WordPress at Http://wildcabbage.net
- I logged in. OK So far, I’ve got a working blog, with the default template, and the default “hello World” entries.
- From the original blog, I copied the plug-ins directory, and the Theme I was using, into the new location, using FTP. I also copied the wp-content/uploads directory.
- Activate the theme.
- Activate all the plug ins, making sure to get any API keys etc you need. You might need to re-authorize some, such as flickr keys, or Google Map API keys.
- Upload the /uploads directory to its new location.
- Now the tricky part. The content. Actually it was easy-peasy. I read up a few articles about how to do
- it, but in the end I did this.
- Go into your SQL database manager at the original site via the admin tools (in my case phpAdmin). Export the database that your blog uses, as a plain SQL file. Save to your local hard drive.
- Use your favorite text editor (NOT a word processor), to edit your file. I actually used Wordpad on an XP box, although I’d have been just as much at home using Kate on my Kubuntu machine.
- Do a find and replace for your old blog location within the file such as http://oldblog.com/blog. Simply put oldblog.com/blog in the search box of your editor, and newblog.com in the replace box. Ok so some of you may be using a command line editor in Linux etc. If you feel more comfortable doing it that way, that’s fine. Whatever works for you.
- In Wordpad I then clicked ‘replace all’ .
- When it had finished, I saved it out. I suggest you save as another name, in case you screwed up somehow.
- Now go to the admin panel for the SQL database in your new blog. Again for me it was phpAdmin. Find the database that the new blog has set up, and drop ALL the tables.
- Now import the data from the text file that you just saved after making that search and replace. It might take a few minutes.
- When it’s finished, log into your blog again. You’ll almost certainly have to log back in, as the old cookie will no longer work until you do, and it sets another one up.
- If all is well you should have all your blog contents in place, and all the links should work.
- Now go back to your old blog to the ROOT folder. this is usually something like ‘/’ or ‘home’ or ‘public_html’ Look for a file called .htacess. If you find one open it for editing, if you don’t find one, create one. You can use dreamweaver, or even the file manager in your cPanel.
- Add the following line to .htacess:
Redirect 301 /oldblog/ http://www.newblog.com/ where oldblog is the location of your blog on the original server (in the example above it was at olddomain.com/oldblog/)
- http://www.newblog.com should be the exact URL to your new blog. If it’s sat at a sub folder add that onto the end and be sure to add the trailing ‘/’ too.
- If you’ve got an RSS feed set up in Feedburner, then be sure to go and change the original feed URL to point to the new address. Don’t touch the Feedburner address itself or everyone will have to re-subscribe to your feed, and you’ll lose at least some of them for sure.
- That should be it. Job Done.
The only thing I have to add, is to say that this is what has worked for me. If you follow this to the letter and your blog explodes, implodes or goes home to mother, you’re on your own. If, however, you find a better way of doing it, or I’ve made an obvious glaring error in your opinion, I’d be glad to open a discussion.