Call to undefined function get_userdata in user.php
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 patch 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?