It’s the end of the world as we know it (merging WordPress blogs)

When Blogs Collide

When Blogs Collide

You know how you have great ideas and you start them and you get side tracked by other things? This is the post about a few of them. You may know a few of my blogs that live in the wild? If not they are ( or now … they were ) I’ve one or two others I may also pull into this one I’ll see just doesn’t have enough useful content I’d like to have on here it’s an old blog without much value but there’s still quite a bit of link love in there I just need to figure out what I’m going to do with it.

Anyways I’ve gone and closed down those three blogs. Why? I just don’t have the time to write much decent content and writing a decent post on one means I’m neglecting the others so it ends up getting to the stage where I simply say what’s the point. Life has gotten in the way of a lot of things. With the arrival of my daughter my blog Brittany Beers which I was creating a few blog posts for suddenly died. I re-created in the new year after my daughters birth and you know what it fizzled out after a few blog posts. Writing decent content isn’t that hard. It is however time consuming. I’m not assuming all my content is worth while but I have in the past created a few decent articles that ended up crashing my site at times due to lack of caching on my part.

Flash forward anyways to my current thinking. Too many blogs not enough Forbairt. So I’ve gone and merged them all into one. (No for the love of god think of the link love I hear you scream … or maybe not) I did however so here’s what I did. It it the perfect way of doing things? probably not but it’s what I’ve done so far and I’m open to suggestions if you know better.

WordPress actually offers a very simple way of moving content from one blog to another and that’s via Tools -> Export. Generally when I’m moving a blog I’ll opt for a complete database / file move to the new site and see how I get on. In this case however I want to merge blogs and not overwrite things so Export / Import to is the way to go for me.

The tools import section will look something like this …

WordPress Tools Import

If you don’t have the WordPress export tool you’ll be prompted to install it.

Install Importer Tool

Click click click and hey presto you’ll be able to export all posts.

WordPress Tools Export

Then on your destination blog you’re ready to import the XML file

WordPress Tools Import XML

Hey presto you’re almost done BUT wait … there’s more

Remember how your old website still exists? Well you don’t want to just nuke it so you’ll want to redirect over your content in a sane way. We do this by creating a redirect link. Simply put a 301 redirect link tells anybody who goes to the site that the content they are looking for now lives at this new address. We’ll dump this info into the .htaccess file on the old website.

In the case of the website had a domain/postname structure so this made things rather simple and by putting

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^forbairt\.ie$ [NC]
RewriteRule ^(.*)$$1 [L,NC,R=301]

into the .htaccess file I was good to go.

Moving turned out a bit a bit trickier why you might ask? Well posts on that site were in the format of domain/year/month/day/postname so a small bit more regexp magic was required

Options +FollowSymlinks
RewriteEngine On
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$$4
RedirectMatch 301 ^(.*)$$1

Finally in moving over I noted that I had one page the about page on there that I didn’t want to include as an about page on so hey presto .htaccess rules to the rescue. I recreated the original about page from Brittany Beers as a post on the new site and gave it the old date. I think went ahead and added the following redirect from there …

RedirectMatch 301 ^/(about)/*$

Taking me from the original matching /about to the /brittany-beers post to the new website blog post I’d setup.

All in all I’m rather happy with the results so far have I missed something probably so I ended up installing the Redirection plugin from WordPress at least for a few days. It lets me know things like what’s not getting redirected correctly and I can then go ahead and setup appropriate redirects. It also alerted me to the fact I’d forgotten the permalink structure for was different to the current blog.

Wordpress Redirection Plugin

Me I’m happy out all the content in the one place seems a lot more worthwhile and less spread out. Who knows I may even keep on blogging




Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.