Title: WordPress User Scaling Issues
Last modified: August 19, 2016

---

# WordPress User Scaling Issues

 *  [Thad Allender](https://wordpress.org/support/users/endortrails/)
 * (@endortrails)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/)
 * The `wp_dropdown_users($args);` function pulls all WordPress users into a dropdown
   list on posts, pages, custom post types, and even some plugins. This is problematic.
   With lots of users, WordPress admin stops loading when this function is called
   for sites with large numbers of users. Obviously, one could increase the max_execution_time
   and RAM in PHP to accomodate looping through all users, but it doesn’t solve 
   the underlying scaling issue WordPress appears to have.
 * Aside from commenting out code in WordPress core and plugins using this function,
   what is a possible future-proof solution? If there is a hook/filter for this,
   please advise.

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

 *  [PeterB](https://wordpress.org/support/users/peter_bepe/)
 * (@peter_bepe)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642950)
 * Same here…
    I’ve got a wp3 site with thousands of users (subscribers). Currently
   they’re sending me articles via email. When I create a new post and try to set
   the author from the authors’ dropdown list, it takes ages, because the dropdown
   list is huge. What can be done? Thanks.
 * P.
 *  [mike503](https://wordpress.org/support/users/mike503/)
 * (@mike503)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642971)
 * Yeah this is horrible. the newest version of WordPress required TWO core hacks
   now to break this instead of just one.
 * I had to comment out the calls to wp_dropdown_users in these two files, otherwise
   even my (quite flexible) PHP configuration wound up sending 502 Bad Gateways 
   off and on.
 * wp-admin/includes/class-wp-posts-list-table.php
    wp-admin/includes/meta-boxes.
   php
 * There was a ticket for this at one point. It was “fixed” but it really wasn’t.
   Discussions about optimizing the db queries and only fetching the columns in 
   question were the bulk of it. Really, I want something to be able to short-circuit
   the code from executing. I tried to hook it by removing the “authordiv” meta 
   box, that didn’t seem to help. Can’t seem to find a plugin method to short-circuit
   or break this without returning false just to stop the function moving forward
   to execute the queries/etc…
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642977)
 * Agreed. The way WordPress handles users is one of the few complaints I have about
   it. I’ve found I can’t use some of the functions because of execution time issues.
   I really think the problem ultimately rests on a less that desirable roles/capability
   implementation, but that is another fight.
 *  [Oleg Dudkin](https://wordpress.org/support/users/olegdudkin/)
 * (@olegdudkin)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642978)
 * You can use “pre_user_query” filter and “debug_backtrace” to handle query.
 *  [Diogo15](https://wordpress.org/support/users/diogo15/)
 * (@diogo15)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642979)
 * HI, i would like to know How do I post under this forum???… i have an advance
   question…
 *  [aladji](https://wordpress.org/support/users/aladji/)
 * (@aladji)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642980)
 * hi evryone.I can’t login in my admin panel .I got this error message:
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/clakup/public_html/wp-content/themes/evolve/functions.php:5261) in /
   home/clakup/public_html/wp-includes/pluggable.php on line 897
 * It gonna be super cool if you guys will help me .
    I’m new here ,so sorry if 
   I post in the wrong place.
 *  [Diogo15](https://wordpress.org/support/users/diogo15/)
 * (@diogo15)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642981)
 * I think you probably delete: wp_head() in header.php or wp_footer() in footer.
   php.
 *  [aladji](https://wordpress.org/support/users/aladji/)
 * (@aladji)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642982)
 * It was a empty space in the code in fontion.php .Thanks for your help anyway
 *  [sobr-rf](https://wordpress.org/support/users/sobr-rf/)
 * (@sobr-rf)
 * [15 years ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642983)
 * hey , thanks for solved
 *  [J Martin](https://wordpress.org/support/users/j-martin/)
 * (@j-martin)
 * [15 years ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642984)
 * I think that version is bad and … I have used it in my own bussines loced in 
   bussines strathfield
 *  [mike503](https://wordpress.org/support/users/mike503/)
 * (@mike503)
 * [15 years ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642985)
 * Thanks to Oleg Dudkin – for some reason all the digging I did I could not locate
   the pre_user_query hook.
 * I wound up doing this:
 *     ```
       function _break_user_list(&$object) {
               global $wpdb;
               $object->query_from = 'FROM '.$wpdb->posts;
               $object->where_where = 'WHERE ID=1';
       }
       add_filter('pre_user_query', '_break_user_list');
       ```
   
 * This forced it to only look up user ID #1, instead of every user in the database(
   which was the default behavior due to our role setup)
 * Voila, no more hacking core!

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

The topic ‘WordPress User Scaling Issues’ is closed to new replies.

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [scaling](https://wordpress.org/support/topic-tag/scaling/)
 * [user](https://wordpress.org/support/topic-tag/user/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 11 replies
 * 9 participants
 * Last reply from: [mike503](https://wordpress.org/support/users/mike503/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/wordpress-user-scaling-issues/#post-1642985)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
