Hello again, world.
Usually, WordPress updates work without a hitch. This time, however, the update somehow thought it had to install a new blog, create new blog database tables within my blog database, and show a lousy “Hello World” post instead of the videos I had just painstakingly uploaded. And within two minutes I was getting roughly an e-mail a minute notifying me of my Chinese spammer friends.
Fixing it wasn’t that obvious, so I’m taking notes here as a reminder for future muck-ups. First, I exported my database before updating – a good idea for my peace of mind, but, if I’m not mistaken, not necessary for saving/restoring my blog. (20/20 Hindsight Tip™: empty spam before exporting, that’ll save a lot of MB.) I had to do three things to restore my database to visibility:
- In wp-config.php, change the value for $table_prefix from “wp_” to “myprefix_”. (Insert real prefix for “myprefix”.)
- In wp-config.php, change the character set to latin1.
- In the newly restored admin panel, change the permalink settings first to default and save the change, then change back to my custom permalink structure (I was smart enough to copy-paste the custom bit beforehand).
Finally, I also deleted the new tables that the new installation had created, which took care of the spam comments in a hurry. And WordPress had to update my database when logging in after step 2, which made my heart skip a beat, but that worked fine.
I do wonder if the update hiccup came from being logged in to the admin panel and the hosting service at the same time, but that seems strange. It’s the only distinction to previous updates, however, that comes to mind.