Technical Difficulties

I had a blogging emergency last week. I went to write the blog post and WordPress wasn’t working. The page I normally use to sign in to write things was broken – it just said “Error establishing a database connection”

I had gone through a similar problem a few weeks before when a client requested a PHP update, which I did and then her WordPress blog stopped working so I had to revert PHP back to 5.x that we were using.

So I went into my hosting configuration and saw that they had updated everyone’s PHP to 7.3.

Ugh.

No choice to remain at 5.x.

I do not like automatic upgrades. I do not like updates in general. I keep an old phone and I decline any updates – my phone’s performance never slows down and I never have any problems with things not working like they used to.

Anyway, I got updated and now I had to deal with it. Because reverting PHP was not an option, I figured I must have to update my WordPress version. Since, you know, I turned off automatic updates and kept it at the version I liked. If it ain’t broke, don’t fix it. Well, now it’s broken so now I have to fix it.

Most of the “how to update WordPress” sites let me know that I can login to my blog and then click the Update button. Those were not helpful because I couldn’t get into my blog. But one of sites was actually helpful and I followed their instructions to download the WordPress install zip file, remove the wp-content directory, then upload that modified zip file into the website and it would be good.

I did that, and tried again. I know the update worked because now the error message had a new font. But it was the same error message. My new WordPress version is now 5.7, and I think the old one was 4.something.

So all that investigating and updating did nothing for me.

I found a handy thingy that let me check what the connection problem was. It involved making a test PHP file that returns mysqli_error, and that told me “The server requested authentication method unknown to the client”

So more Google-fu and the main thread seemed to be with the username and password. A suggested fix was to either alter the current username’s authentication method or create a new username with a different authentication method than the old username.

I created a new username in my host server’s MySQL setup, but I didn’t see anywhere to modify the authentication method. But it kind of worked. Now when I went to the login page I got a notice from WordPress that my site crashed and I’d get an email with some help.

So I checked my email and, sure enough, there was a helpful email that gave me a link to log into my WordPress with safe mode. I guess that was one advantage of upgrading my WordPress version.

I logged in using safe mode and I disabled the offending WP plugin and then everything was magically working again.

Moral of the story: if your WordPress installation stops working, don’t just upgrade things. Check what the problem is with mysqli_error and go from there. New MySQL usernames are free – accidentally overwriting files or losing settings during an update is not free.

You were tired out by the length of your road, Yet you did not say, ‘It is hopeless!’ You found renewed strength, Therefore you did not faint.

Isaiah 57:10

Digg Del.icio.us Reddit Stumble Upon

This little article thingy was written by Some Guy sometime around 6:31 am and has been carefully placed in the Current Events category.

Leave a Reply

Comment moderation: please do not submit your comment multiple times, as comments are not posted until I approve them. If your comment never appears, that probably means that I didn't like your comment (maybe off topic, maybe spam, maybe not family-friendly, etc.).