
OMG implants!
A couple people have asked me about this, and it turns out that it is actually fairly easy to merge blogs. Step 1: Backup your database. Step 2: Admit you ignored step 1 and this time backup your database for real. Ok, now you’re ready to proceed.
6 months ago I thought I would start a manga blog and post so much that I would need a separate blog. Then I found out it took me much longer to write a post than it did to read a chapter, and I found myself with less and less enthusiasm. However, I didn’t just want to waste all that work. And so, like a sand goby, SS!AB consumed Manga Mosaic. For the purposes of this tutorial, I refer to MM as “source_blog” and SS!AB as “dest_blog“. For additional reading, refer to: 1, 2, 3, 4. If you’re timid, note that you should not need to muck around with any code or databases directly in this tutorial. All work is done with plugins or within the WordPress admin area, and the whole process took about 1.25 hours (which included time for me to read instructions, eat a sandwich, and read my email as well as some ESPN).
Prep Work
- I had some identical categories and tags at source_blog, so I renamed all of them with an
M_
prefix. You could just name the categories/tags whatever you want them to appear as on dest_blog, but doing it this way is a tad safer. You may also want to delete all pages, or at least rename them so it’s easy to tell which are duplicates. You want to be able to quickly find posts/categories/tags from source_blog and edit them once they are moved to dest_blog.
- I then put source_blog into Maintenance Mode and backed up the database.
- Create a temporary user in dest_blog. You will be assigning the posts from source_blog to this temporary user, which again will allow you to make global changes to the imported posts more easily. I named this user Temp.
The Crime
- The WordPress Importer and Exporter tools have come a long way. On source_blog go to Tools and then Export. Export the blog and save the file. This shouldn’t take very long.
- Back up dest_blog just in case anything goes wrong.
- On dest_blog go to Tools and then Import. Select the file you want and set Temp as the author of the new files. I also checked the option to download all file attachments. This step took the most time, about 30 minutes for 43 posts.
- In my case, source_blog only used the WP media uploader to upload files, so I can’t guarantee that this will always work. However, when I finished importing, I was pleasantly surprised to see that all pictures from source_blog had been downloaded and then uploaded to dest_blog and all the pictures loaded correctly because the URLs had been automatically corrected to point to dest_blog files. If you uploaded images with FTP and this doesn’t work for you, don’t despair, because we have a few more tricks up our sleeves.
Cleaning Up
- Back up again, so that if you mess up a search/replace iteration you won’t have to do everything again.
- If you have some tricky find/replace jobs to do, you can whip out the SQL queries, but otherwise, installing the Search and Replace plugin on dest_blog will probably be all you need.
- I replaced all instances of
source_blog.com
with
dest_blog.comand then checked to make sure everything was correctly changed.
- If necessary, rename the tags and categories from source_blog to what you want them to be in dest_blog. Do any searching/replacing necessary to get old links to work.
- If the Import didn’t pull all your pictures from source_blog, then manually upload them to dest_blog and do any searching/replacing to make sure that the pictures that you imported display correctly.
- When you are sure that everything worked, delete the user Temp and attribute all of those posts to the appropriate author on dest_blog.
Bribing the Officials
Check to make sure everything works. Now it’s time to make sure old visitors always go to dest_blog to read the posts and also to insure that Google doesn’t smack you down for having identical content in two locations.
- You will want to check to see how the permalink structures differ. In my case I had to go from
http://www.source_blog.com/YYYY/MM/DD/title
to
http://www.dest_blog.com/archives/YYYY/MM/DD/titlein order to make the links match up directly. This is because my two blogs had different permalink structures.
- Install the Redirection plugin on source_blog. This is a pretty cool plugin that is also useful on your active blog if you make a lot of changes to the permalink structure.
- Use the plugin to automatically redirect (with a 301) all attempts to visit posts on source_blog to the corresponding doppelganger on dest_blog. Go to dest_blog and try to click some of you posts to try it out. You can use the Regex option in this plugin as sort of a wildcard. Caution: Don’t be stupid like me and redirect the root of dest_blog. I did this and found myself unable to access the WP admin area. I had to go into the database and delete the corresponding Redirection plugin option in phpMyAdmin to get back in…
- I redirected
http://www.source_blog.com/YYYY/tohttp://www.dest_blog.com/archives/YYYY/
for all years. I’m not 100% sure this is the best method, but it worked. I made sure to add
http://www.source_blog.com/YYYY/as an exception path in the Maintenance Mode settings so that attempts to access front page of dest_blog reached the maintenance page but attempts to access individual posts went through and were redirected. This can be tricky, so here’s a guide and a bunch of regex cheat sheets.
- Don’t forget to redirect feeds. You can do this with Feedburner.
Well, there you have it. It was actually much simpler than I expected. Let me know if you see any errors with this writeup, and I’ll do my best to clarify or correct steps.
|
About Kabitzin: One of the founders of Sea Slugs, I handle most of the blog admin tasks while wearing my I AM BOSS shirt. I like my action series well-choreographed, and my romance series extra trashy. I also have a soft spot for puns. |
7 Comments
Gattai! The ablogging scientist is at it again. D:
So much gattai this week, it’s crazy.
You should start a new blog where you teach people how to blog
Haha, it wouldn’t get updated very often and then I’d have to do this whole process again. I mostly just post about what I’ve personally done that might be useful. Some of the guides I refer to from time to time.
OMG, blog-absorbing Gattai Sea Slugs is on the loose!
Interesting process actually. I need to read up on WP these days.
I should just rename this site Sea Slugs! Anime Blob.
Plz dun eat meh Sea Slugs.
3 Trackbacks
[...] blogs – this would cut down on maintenance – and he also kindly provided much of the how to [...]
[...] This post reports on my experience compared against the list provided by Kabitzin’s trusty blog absorption guide: [...]
[...] and Epi weren’t the only ones added to the team. SS!AB got a new mascot, Nama-ko and also absorbed Manga Mosaic. So even while I wasn’t posting, I was still doing my best to make Sea Slugs a better blog [...]