Tag Archives: PHP

WordPress fixed.

Well that was embarrassing – this website  has been down for a while. It looks like some kind of WordPress upgrade blew the site up – the site was last updated 7/30 so I know it was fine then but it looks like some plugins were updated on 8/2 so probably around that point in time, but looking at my visit stats it looks like it actually went down on the 3rd/4th August.

When I went to the site this evening I got an ugly message of “Fatal error: Class ‘WP_Widget_Custom_HTML’ not found in /pathtomywordpresslocation/wp-includes/class-wp-widget-factory.php on line 106″

From what I can tell, this is the one of the core files from WordPress so is not a file that typically gets changed.

The typical advice for this sort of error is to deactive the plugins installed – either through the database or by renaming the plugins directory in the wp-content directory.  I found that this didn’t actually work and I had to run a manual update for WordPress as per the instructions at https://codex.wordpress.org/Updating_WordPress#Manual_Update

Note that when removing the plugins, wp-includes and wp-admin directory you may want to rename them rather than delete – this way you always have a copy to refer back to. I found that my theme actually required some files from the plugin directory so although the admin site was available, the main site was not available until after I copied the plugins back.

Even more interestingly, after installing WordPress manually and logging into the admin interface I still get “An automated WordPress update has failed to complete – please attempt the update again now”  This is easily fixed by deleting the .maintenance file in the main wordpress directory and then refreshing the admin page.

Phew!

I have now updated my monitor script to check for the existence of text in the page as opposed to just checking that the web page is up and running.