WordPress – when I go to edit a page – Fatal error: Uncaught Error: Class ‘WP_REST_Application_Passwords_Controller’ not found

I have a wordpress install and when I click to edit a post/page to edit I get this error:

Fatal error: Uncaught Error: Class 'WP_REST_Application_Passwords_Controller' not found
in /Users/kawnah/Sites/website/wp-includes/rest-api.php on line 269

Call stack:

create_initial_rest_routes()
wp-includes/class-wp-hook.php:287
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:311
WP_Hook::do_action()
wp-includes/plugin.php:484
do_action()
wp-includes/rest-api.php:521
rest_get_server()
wp-includes/rest-api.php:479
rest_do_request()
wp-includes/rest-api.php:2520
rest_preload_api_request()
array_reduce()
wp-admin/edit-form-blocks.php:82
require()
wp-admin/post.php:187

I went ahead and navigated to the file referenced and see:

enter image description here

And when I navigate to the actual class it is present:

enter image description here

My version of WordPress is 5.6.2 – when I disable all plugins I get a TON of errors:

How do you even go about debugging this? What is the fix for this if any?

Answer

If anyone stumbles on this – what fixed this is downloading fresh core WordPress (https://wordpress.org/download/) and replacing everything except wp-content directory to preserve your theme changes etc.

Leave a Reply

Your email address will not be published. Required fields are marked *