0

My website error log is full of

[lsapi:error] [...] Backend fatal error: PHP Fatal error:  
Call to undefined function get_userdata() 
in /home/.../public_html/wp-includes/user.php on line 460

... and the site does not load (blank page, no source).

The only changes that were recently made are Wordpress and plugin updates (I don't know which ones and when); no programming of any kind.

This answer made me suspect that a plugin did override get_userdata, but a recursive search for function get_userdata in the wp-content\plugins folder (after downloading the entire site through FTP) finds nothing (even a manual inspection for all instances of get_userdata finds only function calls, no definitions).

wp_settings.php seems OK, relevant part:

// Load active plugins.
foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
    wp_register_plugin_realpath( $plugin );
    include_once( $plugin );
}
unset( $plugin );

// Load pluggable functions.
require( ABSPATH . WPINC . '/pluggable.php' );
require( ABSPATH . WPINC . '/pluggable-deprecated.php' );

// Set internal encoding.
wp_set_internal_encoding();

Maybe I can use this 7 year old hack in user.php, but that looks weird. Why would I have to path Wordpress files?

Of course, my primary suspects are still the plugins. I selectively disabled all plugins with this trick, renaming the plugin folder names.

Then, after renaming them back, the site was suddenly accessible again, so was the WP login.

These plugin folder names were:

admin-language
akismet
backupwordpress
broken-link-checker
contact-form-7
flatbook-custom-posts
google-analytics-dashboard-for-wp
gravityforms
mollie-forms
pronamic-ideal

Update Of course the site 'suddenly' worked: I notice in the control panel that all plugins are deactivated (the text Activate is available).

If I now activate Gravityforms, the site hangs again. So I know this is the culprit, but where do I go from here?

0

Well, it was a plugin after all. Since several activated plugins seemed to trigger the error, I thought What is a common plugin here?

It turns out that admin-language was the culprit. With hindsight, that may no be a surprise: that page says:

This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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