Title: PHP Fatal error: Uncaught Error: Call to undefined function wp()
Last modified: October 18, 2024

---

# PHP Fatal error: Uncaught Error: Call to undefined function wp()

 *  [wynot](https://wordpress.org/support/users/wynot/)
 * (@wynot)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp/)
 * Hi – I’m getting the following error in my log file:
 * 18-Oct-2024 18:21:07 UTC] PHP Fatal error: Uncaught Error: Call to undefined 
   function wp() in /home/********/public_html/wp-blog-header.php:16
   Stack trace:
   0 /home/********/public_html/index.php(17): require() 1 {main}
 * thrown in /home/********/public_html/wp-blog-header.php on line 16
 * I have no idea how this happened nor how to fix it?
 * Any help or guidance would be greatly appreciated.
 * Thank you!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-fatal-error-uncaught-error-call-to-undefined-function-wp%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp/#post-18082249)
 * Try to re-upload the WordPress core files via manual update. See: [https://wordpress.org/documentation/article/updating-wordpress/#manual-update](https://wordpress.org/documentation/article/updating-wordpress/#manual-update)
 * After that, I would recommend you run an antivirus scan, e.g. with Wordfence.
   Because something like this doesn’t just happen. If necessary, secure your project,
   see: [https://developer.wordpress.org/advanced-administration/security/hardening/](https://developer.wordpress.org/advanced-administration/security/hardening/)
 *  Thread Starter [wynot](https://wordpress.org/support/users/wynot/)
 * (@wynot)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp/#post-18082262)
 * Thank you! for responding….. would it work if I simply click the re-install button
   on the update backend?
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp/#post-18082275)
 * If this is available to you, of course. I assumed that the backend would not 
   work at all due to the error.
 *  [Marcio Duarte](https://wordpress.org/support/users/pagelab/)
 * (@pagelab)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp/#post-18082278)
 * Hi [@wynot](https://wordpress.org/support/users/wynot/),
 * It’s probably an issue with the WordPress configuration file (`[wp-config.php](https://developer.wordpress.org/advanced-administration/wordpress/wp-config/)`)
   located at the root of your WordPress installation.
 * The `wp-blog-header.php` file is one of the core files, and it’s called quite
   early in the [WordPress request lifecycle](https://learn.wordpress.org/tutorial/the-wordpress-request-lifecycle/),
   so an error message that mentions it means that something is not working at the
   most basic level.
 * If you have a backup system in place, recover a previous backup to see if this
   solves the issue easily.
 * But if it doesn’t, you must check the `wp-config.php` file for extraneous info
   against the [sample config file](https://github.com/WordPress/WordPress/blob/master/wp-config-sample.php)
   provided by WordPress. You can access the `wp-config.php` file via SFTP (with
   an app like [Ciberduck](https://cyberduck.io/)) or any other visual file manager.
   Check with your hosting provider’s support to see if they provide this functionality.
 * I hope this helps.
    -  This reply was modified 1 year, 7 months ago by [Marcio Duarte](https://wordpress.org/support/users/pagelab/).
    -  This reply was modified 1 year, 7 months ago by [t-p](https://wordpress.org/support/users/t-p/).
 *  Thread Starter [wynot](https://wordpress.org/support/users/wynot/)
 * (@wynot)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp/#post-18082284)
 * Ok Thank you so much!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘PHP Fatal error: Uncaught Error: Call to undefined function wp()’ is 
closed to new replies.

## Tags

 * [wp-config.php](https://wordpress.org/support/topic-tag/wp-config-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [wynot](https://wordpress.org/support/users/wynot/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp/#post-18082284)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
