Title: PHP Fatal error: Uncaught Error: Call to undefined function wp_get_current_user
Last modified: July 14, 2023

---

# PHP Fatal error: Uncaught Error: Call to undefined function wp_get_current_user

 *  Resolved [danrancan](https://wordpress.org/support/users/danrancan/)
 * (@danrancan)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp_get_current_user-2/)
 * I am running WordPress 6.2.2. When I activate query monitor, the entire website
   completely breaks and becomes a blank white page. Here are my wordpress logs:
 *     ```wp-block-code
       [14-Jul-2023 16:12:54 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /var/www/mcmo.is/wp-includes/capabilities.php:873
       Stack trace:
   
       0 /var/www/mcmo.is/wp-content/plugins/query-monitor/collectors/doing_it_wrong.php(73): current_user_can()
   
       1 /var/www/mcmo.is/wp-includes/class-wp-hook.php(308): QM_Collector_Doing_It_Wrong->maybe_prevent_error()
   
       2 /var/www/mcmo.is/wp-includes/plugin.php(205): WP_Hook->apply_filters()
   
       3 /var/www/mcmo.is/wp-includes/functions.php(5590): apply_filters()
   
       4 /var/www/mcmo.is/wp-includes/class-phpmailer.php(11): _deprecated_file()
   
       5 /var/www/mcmo.is/wp-content/plugins/contact-form-manager/create-contact-form.php(3): require_once('/var/www/mcmo.i…')
   
       6 /var/www/mcmo.is/wp-content/plugins/contact-form-manager/contact-form-manager.php(44): require('/var/www/mcmo.i…')
   
       7 /var/www/mcmo.is/wp-settings.php(453): include_once('/var/www/mcmo.i…')
   
       8 /var/www/mcmo.is/wp-config.php(195): require_once('/var/www/mcmo.i…')
   
       9 /var/www/mcmo.is/wp-load.php(50): require_once('/var/www/mcmo. in /var/www/mcmo.is/wp-includes/capabilities.php on line 873
       ```
   
 * Here is a list from WP CLI of all my WordPress plugins (active and inactive):
 *     ```wp-block-code
       +-------------------------------------+----------+--------+------------+| name | status | update | version |+-------------------------------------+----------+--------+------------+| tenweb-speed-optimizer | inactive | none | 2.22.32 || tinymce-advanced | active | none | 5.9.0 || akismet | active | none | 5.2 || cleantalk-spam-protect | inactive | none | 6.13 || async-javascript | inactive | none | 2.21.08.31 || autoptimize | inactive | none | 3.1.8.1 || block-temporary-email | inactive | none | 1.6 || classic-widgets | active | none | 0.3 || complianz-gdpr-premium | inactive | none | 6.3.9.1 || contact-form-manager | active | none | 1.5 || webp-converter-for-media | active | none | 5.9.4 || css-js-manager | inactive | none | 2.4.49.12 || database-cleaner | inactive | none | 0.9.4 || debloat | inactive | none | 1.2.1 || duplicate-page | active | none | 4.5.2 || emails-verification-for-woocommerce | active | none | 2.5.7 || envato-market | active | none | 2.0.8 || error-log-monitor | inactive | none | 1.7.7 || full-screen-popup | inactive | none | 1.2.2 || google-listings-and-ads | inactive | none | 2.4.11 || hcode-addons | active | none | 2.6 || health-check | active | none | 1.6.0 || helper-lite-for-pagespeed | active | none | 3.1.6.2 || hummingbird-performance | inactive | none | 3.5.0 || better-wp-security | inactive | none | 8.1.6 || jch-optimize | inactive | none | 4.0.0 || jetpack | inactive | none | 12.3 || jetpack-boost | inactive | none | 1.9.4 || contact-forms-anti-spam | inactive | none | 0.8.1 || mime-types-plus | active | none | 2.03 || newsletter-manager | active | none | 1.5.1 || nginx-helper | active | none | 2.2.3 || nitropack | inactive | none | 1.8.0 || one-user-avatar | active | none | 2.3.9 || optimize-more | inactive | none | 1.1.1 || woo-stripe-payment | active | none | 3.3.43 || performance-lab | inactive | none | 2.4.0 || powered-cache | inactive | none | 3.0.5 || query-monitor | inactive | none | 3.13.0 || seo-by-rank-math | inactive | none | 1.0.119 || real-media-library-lite | active | none | 4.21.0 || redis-cache | active | none | 2.4.3 || simple-cloudflare-turnstile | active | none | 1.22.1 || revslider | active | none | 6.6.14 || slim-seo | inactive | none | 3.21.2 || social-media-auto-publish | active | none | 3.1 || speed-up-javascript-to-footer | inactive | none | 1.0.11 || updraftplus | inactive | none | 1.23.7 || w3-total-cache | inactive | none | 2.3.3 || clearfy | inactive | none | 2.1.9 || woocommerce | active | none | 7.8.2 || woocommerce-paypal-payments | active | none | 2.1.0 || woocommerce-services | active | none | 2.3.0 || wordfence-login-security | inactive | none | 1.1.4 || wp-optimize | inactive | none | 3.2.16 || wp-serverinfo | active | none | 1.66 || js_composer | active | none | 6.13.0 || wp-fastest-cache | inactive | none | 1.1.7 || wp-mail-smtp | active | none | 3.8.0 || amazon-s3-and-cloudfront | active | none | 3.2.4 || wordpress-seo | inactive | none | 20.11 || zero-spam | inactive | none | 5.5.1 || wp-fail2ban-redux | must-use | none | 0.8.2 || advanced-cache.php | dropin | none | || db.php | dropin | none | |+-------------------------------------+----------+--------+------------+
       ```
   
 * Please teach me how to fix this NOW and then please add the fix to an update 
   as well.
 * Thanks.
    -  This topic was modified 2 years, 8 months ago by [danrancan](https://wordpress.org/support/users/danrancan/).
      Reason: added a list of active plugins
 * 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_get_current_user-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp_get_current_user-2/#post-16897298)
 * Thanks for the report, this has been reported already here: [https://wordpress.org/support/topic/fatal-error-uncaught-error-call-to-undefined-function-wp_get_current_user-4/](https://wordpress.org/support/topic/fatal-error-uncaught-error-call-to-undefined-function-wp_get_current_user-4/)

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/query-monitor/assets/icon.svg?rev=2994095)
 * [Query Monitor - The developer tools panel for WordPress](https://wordpress.org/plugins/query-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/query-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-monitor/reviews/)

## Tags

 * [blank-screen](https://wordpress.org/support/topic-tag/blank-screen/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [white page](https://wordpress.org/support/topic-tag/white-page/)

 * 1 reply
 * 2 participants
 * Last reply from: [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-call-to-undefined-function-wp_get_current_user-2/#post-16897298)
 * Status: resolved