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.
No need to go here and there. I was facing the same issue and here is the only solution Fix wp-blog-header.php error
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?
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 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.
There is some WordPress issue.
you please update your
wp_load.php
and using this code.and please change file permission 644 to 444.