WordPress Upgrade And Blog Splitting

|

If you didn’t catch my post from yesterday, I detailed how I just opened a new domain called Mouse Engine Optimizer. The reason for this was to separate out all of my SEO (search engine optimization) and overall Make Money Online posts into a different blog. The diversified content seemed to be throwing off my context-sensitive ads and making it hard for them to stay on target.

This process took three major steps which I will be covering today:

  1. Creating The New Blog
  2. Migrating Existing Blog Posts/Articles
  3. Redirecting Traffic From Old URLs To The New Blog

1) Creating The New Blog

I figured since I was creating a new blog I might as well seize the opportunity to test out the new WordPress 2.2 upgrade. After all I’ve been itching to get to it since release, but haven’t yet had the opportunity. Easy enough I created a directory on my web host (1&1), downloaded the latest WordPress package and unzipped it to the root of my new directory. While uploading all of the latest plugins that I wanted to run, my domain (http://MouseEngineOptimizer.com) was in the works getting setup to point at my latest creation. Finally I uploaded and activated my favorite theme and all is set to go!

Seriously folks… WordPress installation is that simple. It just doesn’t get much easier.

Ok, now the test drive. WordPress 2.2 comes with widget support! Yay! So I obviously excluded Sidebar Widgets as a plugin install. Obviously this is also one of the first things I wanted to test out. I went to the Presentation menu, then to Widgets. Hmmm. I’m used to seeing more sidebars than there are showing here, so there must be an issue. Ok, I have three so let’s give those a test drive. I drag a few widgets onto them and load the site. Nada. Zippo. No chango.

Well, I figure the wise thing would be to rule out the theme as a possible cause. I go download another theme and install it. This theme has several sidebars to choose from. I repeat the previous test and reload the site. Presto chango! It works! Great… that means that my theme is bugged. Which theme is it you ask? Ok, ok. It’s the Subtle theme by Glued Ideas. Everything else still works great with the theme, but the widget support needs a little TLC for the latest WordPress install.

Ok, new theme chosen and installed I figure I’ll try to write a post and make sure that the meat and potatoes of blogging still works. Hello? Where’s my Upload bar? I use the Flickr Photo Gallery by Silas Partners to easily insert photos from my Flickr albums into posts. This functionality is usually embedded within the same space as the Upload section. Of course now I don’t see it, so I cannot use it. This also means I cannot use the same old Upload a file and link it in the post method. Did they mean to remove this functionality? Or am I experiencing a bug? I may just be an idiot (the jury is still out on that one).

One other note, my preview window no longer works. No big deal as they seem to have added a Preview link at the top of the screen whereby you can click it and it actually previews the page full screen. That’s nice but I would also like for my mini-preview screen to work as well. This could just be a localized issue with me.

2) Migrating Existing Posts

I wanted to move my existing posts that dealt with a particular topic to the new blog. Luckily WordPress now offers a convenient Export/Import feature. Cool! From the Manage menu go to Export and you will be able to download a file in the format called WordPress eXtended RSS or WXR. They allow you to select an author to narrow down your export, but of course I am the only author so I just clicked the button and exported everything. It dumped everything to an XML file which I saved to my Desktop.

Next I logged into the Dashboard of my new blog and went to the Import page of the Manage menu. The very last option on the list is to import from the WordPress format so a selected that option. Next I browsed for my XML file and clicked the Upload file and import button. It allowed me to either create a new user or map the entries to an existing author, which I did. Then the import started and it listed the posts as it imported. This process seemed to take a while, but eventually appeared to finish.

Upon inspection, however not all of the posts were present. I went to Manage -> Posts and deleted all of the posts, then repeated the process. Same result. This was odd seeing as the import file did not exceed the 20m limit listed on the Import page. Back to the drawing board.

There were really only four posts which I wanted to copy over. At first I thought perhaps I could manually trim out the unneeded posts from the XML file. This turned out to be a bad option because as it turns out options AND pages are stored as posts. That and the file was pretty large and this would have constituted a fair amount of tedious work. So I went back and truncated the tables of my new blog to eliminate the extraneous information that I had imported such as options from the old blog and pages that I did not realize I was importing. Then I created a new user on this blog to own the posts which I wanted to move. Guess what? There is no way in WordPress to change a posts owner. Yeah, a database change fixed the problem.

Now after repeating the export process I had a file with the four exact posts that I wanted. Perfect. I went back to the new blog and tried to import them. Failure. What!? It only imported two posts. I tried several times, but it kept failing on the second post. As it turns out that post was a very large post with a bunch of links from a group writing project I participated in. It was large, but certainly not huge… WordPress 2.1.3 handled it fine. It was about 140k in size for just the post. I removed all of the links and replaced them with a link to the actual group writing project’s final day results and retried yet again. Voila!

I even went back in and modified the database to include the original large listing of URLs. Guess what? Nope, wouldn’t load the page. I guess the latest version of WordPress has a smaller size limitation on posts.

3) Redirecting Traffic

At any rate I now had a new blog with a shiny new theme and some content. So I can delete the posts from this blog right? Wrong! You see search engines have already indexed this site and other blogs may have linked to internal posts here (yeah right). I don’t want to just delete the posts or anyone following a link to my site will be presented with an error page. That’s not good. What I would like to happen is for them to be able to read the article, but on my new domain.

Well, you can do that! Pretty easily too. Thanks to this how-to on htaccess redirects on the Webweaver site I was able to accomplish the task in no time flat.

The example given from the tutorial for moving a single page is (all one line):

Redirect 301 /oldpage.html http://www.example.com/newpage.html

So for the four posts that I needed to redirect I simply launched my favorite linux based text editor (vi) and added the following to my .htaccess file:

Redirect 301 /2007/05/21/bloggers-make-money-online/ http://mouseengineoptimizer.com/2007/05/21/bloggers-make-money-online/

Sorry if it scrolls off the page. 🙁 Anyway, you get the point. This part was actually quite easy. Of course I made a typo and learned that you definitely want to double check your work. When you get something wrong in this file, nothing about your site works. Period. So have fun!

Conclusion

This blog probably will not be upgrading to the latest WordPress just yet. I think I may wait to test the waters for a while on the new blog until some my issues with it are ironed out. I definitely learned a lot about splitting blog posts into a new blog. 1) Create a new author to reassign the posts to. This makes the export smaller. It’ll also eliminate exporting pages and options that you don’t really want on your new blog. 2) If you’re going to WordPress 2.2 then make sure you don’t have any huge posts in there.