Had a bit of trouble this week, although with any luck you didn’t even notice.
It all began when WordPress told me my social media plugins–you know, the ones I use to update Facebook–had updates available. You’d think at this point I would know better than to just update things, given how often it results in breakage. But I was not prepared for just how bad this one would be. I clicked the button to trigger the updates, and… my blog went down. HTTP 500 errors. Wonderful.
Since I knew it had to do with the plugin updates, I went to the database and simply deactivated all of them. That was easy enough. Then I started turning them back on, one by one, since some other plugins had been updated, too. I confirmed it was the social media plugins when my attempts to activate them produced an error indicating that the Facebook SDK now requires PHP 5.6. I was running 5.4. Well, how hard can it be to upgrade PHP?
Harder than it should be, it seems. It took me some time to hunt down exactly what’s required to upgrade PHP on CentOS 6. I briefly considered upgrading to CentOS 7, but then I saw that there is no supported in-place upgrade, and my control panel doesn’t support 7 anyway. So that was out. I stuck with upgrading PHP.
And then it broke everything else. Specifically, my databases were no longer accessible to PHP. The errors I got were not informative at all and WordPress’ own repair tools couldn’t figure it out. I came across a command-line tool that could do more low-level repairs and troubleshooting, and it told me the underlying problem was old-style MySQL user passwords. So I figured out what you have to do to change those, only they wouldn’t change. I followed the instructions exactly, was using the root MySQL user, but they just refused to be updated.
After fighting with that for a while, I decided this was a losing battle and instead created new MySQL users which had new-style passwords and then configured all the sites I host here to use the new users instead. Now that I know it works I will probably go back and delete the original users, maybe recreate them and put all the original users back. Not sure yet if I want to bother.
What a mess, though. I’m glad I didn’t lose any data and I was only out of action for a couple hours. I am once again reminded of how fiddly supposedly well-established software still is on Linux. At the very least, fixing the passwords should have been more straightforward. I still don’t know why I couldn’t just update them. MySQL certainly found the records but didn’t update them, and didn’t report any kind of error. Very useful.
At some point I may try to upgrade MySQL since my version is quite old, but once again I fear for the consequences.
This must be why some people just pay for hosted WordPress instead of doing this stuff on their own. Ah well, at least it’s good to know how to manage a web server.
Sorry for all the ranting, but maybe someone else out there has run into similar problems.
Have a good week!
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.