• Hi,
    I am trying to install yoast seo plugin, but it gets me error:

    Fatal error: Call to undefined function get_userdata() in /home/hidden/public_html/hidden.com/wp-includes/user.php on line 460

    On that line there is:
    if ( ! $user = get_userdata( $user ) )

    Which is inside of:

    function get_user_option( $option, $user = 0, $deprecated = '' ) {
    	global $wpdb;
    	if ( !empty( $deprecated ) )
    		_deprecated_argument( __FUNCTION__, '3.0.0' );
    	if ( empty( $user ) )
    		$user = get_current_user_id();
    	if ( ! $user = get_userdata( $user ) )
    		return false;
    	$prefix = $wpdb->get_blog_prefix();
    

    I have no idea what should I do, some of other plugins are generating the same error, but thoes are warnings not fatal errors.

    I am runnng wordpress on Godaddy shared hosting,
    Current php: 5.6 (can not update becase on subdomain I have Opencart that may not be compatible with php7)
    I am trying to install YOAST 4.4 because it does not require PHP7

    Developer was creating the site on his server, and after everything was done moved it to our server. If that matters…

    Some help would be much appreciated,

    JurisBBB

Viewing 2 replies - 1 through 2 (of 2 total)
  • get_userdata() is a function in WordPress Core so should always be available. My instinct would be to reinstall WordPress as a clean install and migrate your existing wp-content and database but you might find that complicated.

    The other option is some kind of security plugin or manual manipulation hiding the WordPress core but I would expect other errors if that were the case.

    Your URL is a little strange too.

    Ask the developer?

    Thread Starter jurisbbb

    (@jurisbbb)

    Hi,
    Thank You for Your reply!
    The url I changed before posting here (if You mean that “hidden” part)
    Unfortunately developer is not reachable anymore…

    Well, if no better solution will be found, I probably will need to try reinstalling WP (though the site is up an running with a few thousands visitors per moth… so that will be last option…)

    Again, thank You for Your reply!

    JurisBBB

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error get_userdata() in user.php’ is closed to new replies.