There is a conflict between two versions of the wp_update_https_detection_errors() function, causing a fatal error and displaying an error message. The issue is related to the automated update using wp-cli. Since you cannot access the WordPress dashboard to troubleshoot the issue, you can try resolving it using FTP or SSH.
Here’s how to proceed:
– Using your credentials, connect to your WordPress hosting server via FTP or SSH.
– Navigate to the wp-includes folder where the core WordPress files, including the deprecated.php file, are located.
– To disable the deprecated.php file temporarily, rename it to something like deprecated.php.bak.
– Try reaccessing the WordPress dashboard. If the error message is gone, you can identify the source of the conflict.
– If the error persists, it may be due to a plugin conflict. Deactivate all plugins and reactivate them individually to find the one causing the issue.
– Once you find the plugin causing the conflict, disable it or update it to a compatible version. After that, you can rename the deprecated.php file to its original name.
Another potential solution is to roll back to a previous version of WordPress or restore your website from a backup taken before the update.
Try out these, and let me know how it goes.
Thanks! But renaming deprecated.php just gives this error:
Failed opening required '/home/gilgongo/html/nickyo/wp-includes/deprecated.php
I could roll back, but that wouldn’t necessarily tell me what’s up.
Interestingly, when I try commenting out the wp_update_https_detection_errors function in deprecated.php, I get a different “Cannot redeclare” error.
Cannot redeclare _wp_theme_json_webfonts_handler() (previously declared in /home/gilgongo/html/nickyo/wp-includes/deprecated.php:5407)
So maybe it’s some other issue?
OK I think I fixed it by rolling back to a previous version, then upgrading plugins, themes and then wp core. No idea what was causing the error though. WordPress is weird and strange. Thanks for your help though!
-
This reply was modified 2 years, 4 months ago by
gilgongo.
I’m glad you resolved the issue by rolling back to a previous version and upgrading plugins, themes, and WordPress core. Great troubleshooting!