14

Fatal error: Call to undefined function wp() in /home/content/33/7211533/html/someSite/wp-blog-header.php on line 14

Can anyone figure whats the problem?

I already update the wp-includes and wp-admin folder and my functions.php is fine, but I haven't figure out how to fix it. Any suggestions?


EDIT

I reinstalled WordPress, (upload the new copy on the site, and I made sure it's up to date) - equivalent to a manual update.

After that its started to work fine, so this problem is now fixed.

3
  • You're going to need to provide quite a bit more information, about your environment (WordPress version, active Theme/Plugins, etc.), anything out of the ordinary that you might be doing, and where/how you're getting the error. Commented Aug 12, 2011 at 18:12
  • 1
    Please add your solution as an actual answer instead of as an edit to the question.
    – s_ha_dum
    Commented Aug 25, 2013 at 21:34
  • Check WP Error Fix (wordpress.org/plugins/wp-bug-tracker) plugin. I guess it was called WP Bug Tracker before.
    – user41007
    Commented Oct 28, 2013 at 12:24

9 Answers 9

9

wp() is quite essential function. It resides in functions.php file (don't confuse with functions.php in theme, different thing) and I don't think you can load WP without passing require directive for that file at some point.

So your install seems very broken - either functions.php file in core is damaged or something else is broken and makes it skip loading that file.

1
  • yes your right man , what I did is I reinstall everything...I fix the problem already before I read your answer, but your answer is same as mine , so I'll pick your answer too :)
    – nold
    Commented Aug 14, 2011 at 5:08
27

Your wp-config.php file might be empty for some reason.

7
  • 3
    Why is this getting downvoted? It was the cause in my case.
    – br4nnigan
    Commented Sep 15, 2016 at 23:04
  • 2
    This was the problem on my end too. I think a save of wp-config got interrupted, and the file ended up being blank and was throwing this error. Restored it and it was fixed.
    – sbuck
    Commented Sep 30, 2016 at 3:58
  • I don't know what made my wp-config.php became empty. Once it was fixed, everything worked fine...
    – amit bakle
    Commented Oct 27, 2019 at 6:09
  • Same issue here. Restored my wp-config.php from a backup and everything was OK
    – Patrick
    Commented Sep 10, 2021 at 6:15
  • Same issue and solved with wp-config.php Commented Oct 13, 2022 at 7:53
2

When I migrated to Siteground, I don't know why Siteground changed the include file in the last line of wp-config.php file to a wrong directory.

screenshot

The correct path should be this one instead:

/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) )
    define( 'ABSPATH', dirname( __FILE__ ) . '/' );

/** Sets up WordPress vars and included files. */
require_once( ABSPATH . 'wp-settings.php' );
1

It seems the issue was a result of corrupted wp-config.php I updated the local version with the database credentials and uploaded via ftp and it worked.

0

This problem can be caused by using the automatic update when you don't have enough disk space. If that is the case, free up some space on your server, then upgrade Wordpress to the latest version manually.

0

Had the same issue. Have an easier solution:

  1. Open wp-settings.php
  2. Comment out the following lines (search for "health":
    // if ( ! class_exists( 'WP_Site_Health' ) ) {
    //    require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
    // }
    // WP_Site_Health::get_instance();
  1. Update all your plugins
  2. Restore wp-settings.php to the previous state
0

My wp-load.php got emptied/cleared when I was uploading a plugin and it failed. That was super weird.

If you go to your WP root, just sort by recently edited and you'll find the problem file.

Then you just need to upload that file from a fresh install. In my case I just overwrote wp-load.php

0

Just adding my experience to this thread, for me the wp-config had gotten corrupted, presumably by either a WordPress or plugin update, and I was now missing the following at the bottom of the file:

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';

So to summarise the thread above an add a few of my own suggestions:

  • Check wp-config for any issues
  • Update all WordPress files manually
  • Try renaming the wp-plugins folder to rule out an issue with plugins
  • Check disk and inode usage on the server (see here for commands)
-1

amazing...if you have fatal error or call to undefined funcction jus go to your email and on that email you may have a sent message from your hosting adress...just reinstall or from that email page you log in...problem will be fixed..

1
  • 4
    WordPress does not send an email on a fatal error.
    – fuxia
    Commented Aug 22, 2017 at 5:50

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