How to solve the problem Fatal error: Uncaught Error: Call to undefined function wp_is_recovery_mode()

You have launched an update of WordPress and unfortunately this update could not be completed. You no longer have access to the administration panel and the following error is displayed:

Fatal error: Uncaught Error: Call to undefined function wp_is_recovery_mode()

The cause

Unfortunately, it is difficult to find out, at the time, how this problem could occur: server problem, disk space, process interrupted by an action or a trigger… an interfering plugin… many causes can affect your WordPress installation and thus its updates.
To analyze the problem in more depth, you should debug the update process in order to identify the moment of the blockage and then the cause of the problem.

The solution

wp_is_recovery_mode() is a function to “run” WordPress in maintenance mode. This mode pauses plugins and themes that can cause WSOD (White Screen Of Death). This feature was introduced in WordPress 5.2.0 and can be very useful, especially when you encounter blocking Fatal Errors.

But in our case, it’s the maintenance feature itself that is blocking us. The idea here will be to temporarily work around the error and then reinstall WordPress, because the update having failed, our current installation is certainly incomplete, inconsistent and therefore non-functional.

  • Connect by FTP(s) to your site
  • Retrieve and edit the in-header.php file located in the wp-admin folder.
  • Identify in this file the wp_is_recovery_mode() function and comment it (or delete it)
  • Try to access your administration interface
  • Restart the update by accessing the page wp-admin/update-core.php (http(s)://example.com/wp-admin/update-core.php)

If you can’t solve this error, try to see in your archives or on the side of your host if it would be possible :

  • Either restore your WordPress installation and your database before the malfunctioning
  • Either reinstall WordPress and restore (a backup) / repair your database
Leave a Comment

Your email address will not be published.

You may also like