Monday, March 04, 2019

Another (Non-Affiliate-Commission-Producing) Shout Out About How Freaking Great Hostgator Support is

Last Thursday, Rational Review News Digest went down. Hard.

It started with a "bad gateway" error. That only went on for a couple of minutes.

Then the site seemed to come back up, except that when I tried to create or edit content in Wordpress, instead of the post editor opening, the raw code for the post editor displayed.

I did the things I could think of (and completely spaced one thing I should have thought of), did some Googling that led me to a seemingly reasonable conclusion (that Apache was screwing up and a server re-start was needed), and contacted Hostgator tech support.

The support guy checked out the server status. No, there wasn't any obvious problem there, other sites weren't affected, and since I'm on "shared cloud" hosting, no, he wasn't going to bring all those other sites down temporarily with a server re-start.

Then he started trouble-shooting, one step at a time, asking my permission for each thing (e.g. "can I turn off all your Wordpress plug-ins and see if the problem goes away? If so, we can turn them back on one at a time and see which one has gone rogue").

After a good 15 minutes of this (during which he sent a ticket upward in their support structure), he suddenly noticed what I had forgotten:

Everything was still running through Cloudflare. I hadn't turned that off. So we were seeing cached content that wasn't going to reflect the changes we made.

Turned off Cloudflare. Changed to another theme, and Shazam! -- the site worked. Of course, it looked like hell because I run a heavily customized theme (to which I hadn't made code changes in more than two years), but obviously the problem WAS with my theme -- whenever I went back to the theme, the "shows the post editor code instead of the post editor" problem came back, and on the display end of the site a PHP error related to the theme came up.

So, that was the end of his job. Fixing or replacing the theme is my job. His job had actually stopped long before he stopped helping me. As soon as he knew that it wasn't something wrong at Hostgator, he could have just said "your problem, not ours, buddy" and gone on his merry way. Instead, he got me far enough along the track to finish the job myself.

So, thanks again to Hostgator for the above and beyond service I've lauded them for many times on this blog.

I ended up fixing the problem by:

1) Saving the parts of the theme I had customized;

2) Downloading a fresh copy of the theme;

3) Deleting the theme from the Wordpress "themes" folder on the site;

4) Uploading the fresh copy;

5) Replacing the default theme's files with my edited ones, one at a time.

Turns out the problem wasn't with any of my edited (long previously) files. I uploaded them all and the site kept working. My best guess is that a bit or three on the drive / in the default theme files got corrupted by a rogue cosmic ray or something.

No comments: