0

Anybody got a solution for this?

I can't reach admin page or most of the other pages except I can reach the home page.

Fatal error: Uncaught Error: Class 'WP_Widget' not found in /home1/thehub/public_html/theseen.org/wp-includes/widgets/class-wp-widget-links.php:17 Stack trace: #0 /home1/thehub/public_html/theseen.org/wp-includes/default-widgets.php(14): require_once() #1 /home1/thehub/public_html/theseen.org/wp-includes/functions.php(3782): require_once('/home1/thehub/p...') #2 /home1/thehub/public_html/theseen.org/wp-includes/class-wp-hook.php(286): wp_maybe_load_widgets('') #3 /home1/thehub/public_html/theseen.org/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #4 /home1/thehub/public_html/theseen.org/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /home1/thehub/public_html/theseen.org/wp-settings.php(350): do_action('plugins_loaded') #6 /home1/thehub/public_html/theseen.org/wp-config.php(86): require_once('/home1/thehub/p...') #7 /home1/thehub/public_html/theseen.org/wp-load.php(37): require_once('/home1/thehub/p...') #8 /home1/thehub/public_html/theseen.org/wp-admin/admin.php(31): require_once('/home1/ in /home1/thehub/public_html/theseen.org/wp-includes/widgets/class-wp-widget-links.php on line 17

3
  • Can you add some context; what was going on before this happened, were you editing something, etc. Step one is usually always to disable the plugins and also try switching back to the default theme. Commented Feb 21, 2021 at 5:19
  • The site was abandoned for some time... the error is not due to changes that I made it seems to just be something that wordpress auto updates didn't like. I have tried to disable the plugin folder and receive the same error...it is a problem with the Widgets which do not seem to be a plugin, but more integral to WP. Commented Feb 21, 2021 at 18:46
  • That's not always exactly how it works; there is the possibility that the code executes properly within the file and only when WordPress' functionality becomes involved does the error then happen because of a conflict or dependency. So what you get then is an error that it's something within WordPress but really the error is stemming from deprecated code. If it's widget related you could also try switching to the default WordPress theme, you can do this by adding an underscore to the front of your theme directory via FTP '_theme-name'. Commented Feb 22, 2021 at 18:11

1 Answer 1

0

There's a good chance the Class "WP_Widget" not found error is caused by bot scans courtesy of script kiddies.

As suggested in a response to a question at WordPress, the scanning script will terminate when the following code is inserted at the top of blocks/index.php:

<?php
if (!defined('ABSPATH') || !defined('WPINC')) {
    exit;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.