• gilgongo

    (@gilgongo)


    Hi – I have a site that’s suddenly showing a fatal error message, which seems to be the following:

    Fatal error: Cannot redeclare wp_update_https_detection_errors() (previously declared in /home/gilgongo/html/nickyo/wp-includes/https-detection.php:104) in /home/gilgongo/html/nickyo/wp-includes/deprecated.php on line 5978

    The site’s version.php says it’s 6.4.1. I think this started happening after an automated update using wp-cli. I now can’t log in though.

    Does anyone know where to go with this? I understand the function wp_update_https_detection_errors issue isn’t used by themes or plugins though, so I guess it’s not that? Any URL called on the site seems to hit his error too.

    Thanks for any help.

    • This topic was modified 1 year ago by gilgongo.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Aniekan

    (@anieeedet)

    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.

    Thread Starter gilgongo

    (@gilgongo)

    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?

    Thread Starter gilgongo

    (@gilgongo)

    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 1 year ago by gilgongo.
    Aniekan

    (@anieeedet)

    I’m glad you resolved the issue by rolling back to a previous version and upgrading plugins, themes, and WordPress core. Great troubleshooting!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_update_https_detection_errors issue’ is closed to new replies.