IrishWonder Blog Rehosted

Those of you who have noticed my blog unusually empty with all posts gone in the last few days have probably been wondering what kind of a disaster has happened to me. Nothing too scary, it was just me rehosting this site to a new server. Problem is, my backup feed from the old location has been slightly messed up resulting in me having to fix it before I could successfully recover my blog on the new server.

Others moving their blogs may also encounter similar problems so I thought I’d share what happened to save you from repeating my mistakes. You see, the wordpress version on my old host was a really old one, plus I wasn’t using Akismet but rather marking comments as spam locally. As a result, the backup feed included all the old comments marked as spam into it, producing a feed of over 47 Megs! What a monster. Of course my new WordPress (with backup feed size limited to 2 Megs) refused to eat it and choked on it. To sort out this mess I had to write a Ruby script to clean it all up and then still manually check things. Hence, if you notice your old comment on here has been nuked, here’s why.

How one should handle this situation ideally: if you’re using “Mark as spam” WP functionality go to spam comments BEFORE backing up your blog and make sure you delete all the comments there. Only after this is done you can safely back your blog up and import it into your new WP installation. Whew!

UPDATE: If you have a WP version so old that it doesn’t even let you look at your modded comments marked as spam,  go to your phpMyAdmin, select your wordpress database, go to the “wp_commets” table and run this SQL query:

DELETE FROM `wp_comments` WHERE `wp_comments`.`comment_approved`= ‘spam’

– this should clean the comments table for you safely and fast without removing any previously approved comments that you’d like to keep in your backup (which, in case of such an old WP version, will most likely be a DB dump).


Posted

in

by

Tags: