Recovering from “There has been a critical error on your website” error!


TitanFusion experienced the dreadful “There has been a critical error on your website” error after an automatic WordPress update failed to install version 6.4. Not good, because the day that happened, I was traveling. I did not know it had happened until next morning. There is no easy way to get this fixed, because it was not a plug-in issue. Something that can be fixed by disable the most recently updated plug-in or the whole plug-ins directory. After reviewing the server logs, it turned out to be a fatal PHP error resulting from a redeclare of the wp_update_https_detection_errors function. This means that during the automated update some files were updated and other were not!

After making a backup of the WordPress install directory my first attempts was to force a core update using WP-CLI. The WP utility is handy if you have a functioning WordPress instance, but that is something I did not have. So, that attempt failed. The option I was left with was to have a fresh copy of the WordPress files replace the existing corrupt ones. A quick grab of the latest WordPress release revealed that the new version was 6.4.1. The fresh files can be either manually copied to the install directory, or the process can be automated using rsync.

I ended up using rsync to replace any WordPress core files in the install directory. After replacing the files TitanFusion became accessible, again. I was simply prompted to complete the database update. Below is the rsync command I used.

$rsync -a path_to_source_dir/ path_to_wp_install_dir/

Make sure to add the forward slash (/) at the end of each path!


Discover more from Titan Fusion

Subscribe to get the latest posts sent to your email.

Date Published:

Categories:


Discover more from Titan Fusion

Subscribe now to keep reading and get access to the full archive.

Continue reading