Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */

if ( !isset($wp_did_header) ) {

  $wp_did_header = true;

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

  wp();

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

}

?>

Any help would be greatly appreciated.

share|improve this question
    
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

2 Answers 2

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?

share|improve this answer
    
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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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