Title: WP_User_Query::query was called incorrectly.
Last modified: February 16, 2023

---

# WP_User_Query::query was called incorrectly.

 *  [sgrassl](https://wordpress.org/support/users/sgrassl/)
 * (@sgrassl)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wp_user_queryquery-was-called-incorrectly/)
 * When switching from php 7.4 to php 8.0 i get the warning 
   **WP_User_Query::query
   was called incorrectly**.When i disable the Clearfy plugin the warning disappears.
   The problem appears on different WP installations.Does anyone have the same problem?
   Is there a workaround?

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

 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wp_user_queryquery-was-called-incorrectly/#post-16480623)
 * Hi.
 * We do not use this function. Please send the whole text of the error
 *  Thread Starter [sgrassl](https://wordpress.org/support/users/sgrassl/)
 * (@sgrassl)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/wp_user_queryquery-was-called-incorrectly/#post-16483115)
 * When I enable the clearfy caching this message appears:
   PHP Notice: Function 
   WP_User_Query::query was called **incorrectly**. User queries should not be run
   before the `plugins_loaded` hook. Please see [Debugging in WordPress](https://wordpress.org/support/article/debugging-in-wordpress/)
   for more information. (This message was added in version 6.1.1.) in /html/wp2022/
   wp-includes/functions.php on line 5835
 *  Thread Starter [sgrassl](https://wordpress.org/support/users/sgrassl/)
 * (@sgrassl)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/wp_user_queryquery-was-called-incorrectly/#post-16578061)
 * Hi,
   Any news on this issue?Regards

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

The topic ‘WP_User_Query::query was called incorrectly.’ is closed to new replies.

 * ![](https://ps.w.org/clearfy/assets/icon-256x256.gif?rev=2392119)
 * [Clearfy Cache – WordPress optimization plugin, Minify HTML, CSS & JS, Defer](https://wordpress.org/plugins/clearfy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/clearfy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/clearfy/)
 * [Active Topics](https://wordpress.org/support/plugin/clearfy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/clearfy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/clearfy/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [sgrassl](https://wordpress.org/support/users/sgrassl/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/wp_user_queryquery-was-called-incorrectly/#post-16578061)
 * Status: not resolved