Title: Fatal error get_userdata() in user.php
Last modified: August 18, 2017

---

# Fatal error get_userdata() in user.php

 *  [jurisbbb](https://wordpress.org/support/users/jurisbbb/)
 * (@jurisbbb)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-get_userdata-in-user-php/)
 * 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)

 *  [chrispink](https://wordpress.org/support/users/chrispink/)
 * (@chrispink)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-get_userdata-in-user-php/#post-9421629)
 * 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](https://wordpress.org/support/users/jurisbbb/)
 * (@jurisbbb)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-get_userdata-in-user-php/#post-9421677)
 * 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.

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [undefined function](https://wordpress.org/support/topic-tag/undefined-function/)
 * [user.php](https://wordpress.org/support/topic-tag/user-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [jurisbbb](https://wordpress.org/support/users/jurisbbb/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-get_userdata-in-user-php/#post-9421677)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
