Title: prevent wp_count_users
Last modified: December 8, 2016

---

# prevent wp_count_users

 *  Resolved [levymetal](https://wordpress.org/support/users/levymetal/)
 * (@levymetal)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/prevent-wp_count_users/)
 * I manage a website that has over 110,000 WordPress users. The WP Admin interface
   has become really slow (it takes about 10 seconds for each page to load). Using
   the Debug Bar plugin, I narrowed it down to a function called count_users().
 * This function fires on every admin page load, but only when the w3tc plugin is
   enabled. If I disable the w3tc plugin, count_users() not called, and WP Admin
   is fast again.
 * I’ve tried to dig into w3tc source to figure out why count_users() is getting
   triggered, but haven’t had any luck so far.
 * Does anyone have any idea why this is happening, and/or what I can do to fix 
   it?

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

 *  Thread Starter [levymetal](https://wordpress.org/support/users/levymetal/)
 * (@levymetal)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/prevent-wp_count_users/#post-8574948)
 * After further investigation, it turns out that w3 total cache is causing an issue
   with the `update_core` transient.
 * On line 636 of `wp-includes/update.php`, you’ll find the following line: `$current
   = get_site_transient( 'update_core' );`
 * When the plugin is enabled, this line fails; `get_site_transient( 'update_core')`
   returns false. This causes `wp_version_check()` to be called on every page load.
 * I will continue to investigate to figure out why w3 total cache is affecting 
   the `update_core` transient, but some input would be greatly appreciated.
 * However, this is not the cause of the slowdown (neither is count_users). Even
   when I comment these functions out of WP Core, WP Admin is still slow. With the
   plugin disabled, WP Admin is fast.
    -  This reply was modified 9 years, 5 months ago by [levymetal](https://wordpress.org/support/users/levymetal/).
    -  This reply was modified 9 years, 5 months ago by [levymetal](https://wordpress.org/support/users/levymetal/).
    -  This reply was modified 9 years, 5 months ago by [levymetal](https://wordpress.org/support/users/levymetal/).
 *  Thread Starter [levymetal](https://wordpress.org/support/users/levymetal/)
 * (@levymetal)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/prevent-wp_count_users/#post-8583435)
 * I’ve narrowed this down to the Object Cache setting in w3 total cache. I had 
   Object Cache turned on, using memcached. Turning this off has made WP Admin fast
   again.
 * I’m going to mark this as resolved, I’m assuming that the Object Cache isn’t 
   massively important.

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

The topic ‘prevent wp_count_users’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [levymetal](https://wordpress.org/support/users/levymetal/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/prevent-wp_count_users/#post-8583435)
 * Status: resolved