How to fix this rest-api Wordpress error?

Viewed 24

When I try to access to edit any post or page I get this rest_api.php error:

Fatal error: Uncaught Error: Class 'WP_REST_Widgets_Controller' not found in /home/mywebsite/www/wp-includes/rest-api.php:329 Stack trace: #0 /home/mywebsite/www/wp-includes/class-wp-hook.php(307): create_initial_rest_routes(Object(WP_REST_Server)) #1 /home/mywebsite/www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #2 /home/mywebsite/www/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #3 /home/mywebsite/www/wp-includes/rest-api.php(561): do_action('rest_api_init', Object(WP_REST_Server)) #4 /home/mywebsite/www/wp-includes/rest-api.php(519): rest_get_server() #5 /home/mywebsite/www/wp-includes/rest-api.php(2868): rest_do_request(Object(WP_REST_Request)) #6 [internal function]: rest_preload_api_request(Array, '/wp/v2/types?co...') #7 /home/mywebsite/www/wp-includes/block-editor.php(601): array_reduce(Array, 'rest_preload_ap...', Arra in /home/mywebsite/www/wp-includes/rest-api.php on line 329 There has been a critical error on this website. Please check your site admin email inbox for instructions.

How could I fix it?

Thank you!

0 Answers
Related