I recently updated a site and received the following error message:

Fatal error: Call to undefined function wp() in /home/atlmp/public_html/wp-blog-header.php on line 14

I checked the file and there doesn't seem to be any issues, so I can't figure out what's wrong?

 * Loads the WordPress environment and template.
 * @package WordPress

if ( !isset($wp_did_header) ) {

  $wp_did_header = true;

  require_once( dirname(__FILE__) . '/wp-load.php' );


  require_once( ABSPATH . WPINC . '/template-loader.php' );



Any help would be greatly appreciated.

  • Where have you got that call? Be a little more specific and please show us the template where it appears. It looks like you're trying to access some part of wp (directly) without loading it. – kaiser Mar 25 '11 at 15:36

To load WordPress it is enough to load "wp-load.php" like you did. I don't recognize the wp() function and haven't found it in the source. As other people seem to have the same problem on the internet I guess it has to do with a plugin or a possibly outdated WordPress installation.

Disable all your plugins and see if that resolves the problem.

Out of curiosity: What is this file for?

  • It is a directory website. I was just updating WP from the dashboard? I have gone ahead and deleted everything and FTP'd a new install. Everything seems to be working fine now. Thanks for your help. – Marna Mar 27 '11 at 4:01
  • Ah yes, I see! Thought that this was part of your theme code. But your right, it's part of the WordPress core. Glad that a "reinstall" fixed it for you. – marvinhagemeister Mar 28 '11 at 8:01

I agree. Usually it's a plugin that causes these issues in my experience. it can be a headache, but disabling all of your plugins, then going through and enabling your plugins one by one will often pinpoint the problem.


I just had to fix this exact issue. My site [Riverside Bartending School] went down and like the many with this issue or one similar report I too could not access the Admin Panel. So this is what I did.

Using cPanel (you can also use FTP) I deleted all the cache and super cache files.

Then I uploaded a fresh copy of Wordpress replacing all the Wordpress files except for wp-content folder and contents.

Thirdly, I changed the wp-config.php file to make sure that the database credentials were correct.

Next step was to attempt to login to the admin panel, and it was a success. Then reactivate the plugins - again a success. Test the site and viola it was up and running.


I was facing this error when moving my site files from hostgator to other host, what I did was ZIP the files and FTP them to the new host. something messed up with compressing the files, when I compressed them with tar.gz everything worked fine. that's what helped me after several hours,

probably something with the encoding of files.

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.