Hi Ollie, thanks for the plugin!
I have it installed on a site with >500k users. The indexing seems to get so far but then fails and stops progressing.
I’m seeing this in the debug log:
[20-Oct-2024 13:24:02 UTC] Cron unschedule event error for hook: index_wp_users_for_speed_task, Error code: could_not_set, Error message: The cron event list could not be saved., Data: {"schedule":false,"args":["-populate-meta-index-roles_1",42]}
[20-Oct-2024 13:24:05 UTC] WordPress database error Failed to read auto-increment value from storage engine for query INSERT INTO wp_usermeta (user_id, meta_key) SELECT user_id, meta_key FROM (SELECT a.user_id, 'wp_iufsr:administrator' meta_key
FROM wp_usermeta a
LEFT JOIN wp_usermeta b
ON a.user_id = b.user_id
AND b.meta_key = 'wp_iufsr:administrator'
WHERE a.meta_key = 'wp_capabilities'
AND a.meta_value LIKE CONCAT('%', 'administrator', '%')
AND b.user_id IS NULL UNION SELECT a.user_id, 'wp_iufsr:editor' meta_key
FROM wp_usermeta a
LEFT JOIN wp_usermeta b
ON a.user_id = b.user_id
AND b.meta_key = 'wp_iufsr:editor'
WHERE a.meta_key = 'wp_capabilities'
AND a.meta_value LIKE CONCAT('%', 'editor', '%')
AND b.user_id IS NULL UNION SELECT a.user_id, 'wp_iufsr:author' meta_key
FROM wp_usermeta a
LEFT JOIN wp_usermeta b
ON a.user_id = b.user_id
AND b.meta_key = 'wp_iufsr:author'
WHERE a.meta_key = 'wp_capabilities'
AND a.meta_value LIKE CONCAT('%', 'author', '%')
AND b.user_id IS NULL UNION SELECT a.user_id, 'wp_iufsr:contributor' meta_key
FROM wp_usermeta a
LEFT JOIN wp_usermeta b
ON a.user_id = b.user_id
AND b.meta_key = 'wp_iufsr:contributor'
WHERE a.meta_key = 'wp_capabilities'
AND a.meta_value LIKE CONCAT('%', 'contributor', '%')
AND b.user_id IS NULL UNION SELECT a.user_id, 'wp_iufsr:subscriber' meta_key
FROM wp_usermeta a
LEFT JOIN wp_usermeta b
ON a.user_id = b.user_id
AND b.meta_key = 'wp_iufsr:subscriber'
WHERE a.meta_key = 'wp_capabilities'
AND a.meta_value LIKE CONCAT('%', 'subscriber', '%')
AND b.user_id IS NULL UNION SELECT a.user_id, 'wp_iufsr:customer' meta_key
FROM wp_usermeta a
LEFT JOIN wp_usermeta b
ON a.user_id = b.user_id
AND b.meta_key = 'wp_iufsr:customer'
WHERE a.meta_key = 'wp_capabilities'
AND a.meta_value LIKE CONCAT('%', 'customer', '%')
AND b.user_id IS NULL UNION SELECT a.user_id, 'wp_iufsr:shop_manager' meta_key
FROM wp_usermeta a
LEFT JOIN wp_usermeta b
ON a.user_id = b.user_id
AND b.meta_key = 'wp_iufsr:shop_manager'
WHERE a.meta_key = 'wp_capabilities'
AND a.meta_value LIKE CONCAT('%', 'shop\\_manager', '%')
AND b.user_id IS NULL) a WHERE a.user_id >= 209999 AND a.user_id < 214999 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, Cron_Event_Command->run, Cron_Event_Command::run_event, do_action_ref_array('index_wp_users_for_speed_task'), WP_Hook->do_action, WP_Hook->apply_filters, IndexWpUsersForSpeed\index_wp_users_for_speed_do_task, IndexWpUsersForSpeed\Task->doTaskStep, IndexWpUsersForSpeed\PopulateMetaIndexRoles->doChunk, IndexWpUsersForSpeed\Task->doQuery
Resetting it to “immediately, then daily” doesn’t re-trigger the indexing. The only way to get it to restart is to deactivate/reactivate, but then it starts from the beginning again and fails at a random point.
The site has WP CRON disabled and is running a server CRON every 60s. There’s no object caching installed.
Any ideas?
Many thanks in advance!
We’ve installed this plugin on a site with >2500 users and it’s increased the performance in the backend significantly!
However, we’re finding that the Author selection box on posts is causing us a lot of issues. On the original dropdown, it listed the Author name and email address (we have a lot of users with the same name so this was an essential change) and it also doesn’t show the currently selected author
When we select a user we get a JavaScript error;
We would ideally prefer to have the original dropdown box, however I can’t find a way to do this. At the moment, we can’t really assign authors to posts which means we can’t really use the plugin, however the performance gains are massive so we’d like to use the plugin if possible!
]]>Hi !
Is there a way to see if the process is still running ? It feels like it may be stuck at 53%.
I’d like to make sure that everything is ok because I have a strange problem with my dropdown user list not displaying all of my contributors of authors (I’m using wp_dropdown_users_args
to display the contributors.
Thanks !
PS : I have suggested a french translation if you want to add it !
]]>Hello!
We used your MySQL plugin and loved it so we installed this one and ran it, but now we are seeing notices at the top of the website every day and they are different each time the page refreshes.
One moment it will say “Background user index building in progress:?31% complete. You may use your site normally during index building.” even though it finished indexing a week ago, the next minute it will say “Background user index building in progress:?62% complete. You may use your site normally during index building.” and then it will say 100%.
Is this normal? The notices never seem to go away.
We have it set to run once a day at 3AM.
]]>the “Choosing authors when editing posts and pages” settings are insufficient and causes user selection to be impossible in LearnDash. Is there any way to disable this permanently or increase the theshold beyond 100?
]]>I’m running a site with 90K users, using MemberPress. I’m currently using WP Sheet Editors (https://wpsheeteditor.com/extensions/edit-users-spreadsheet/) to manage the users.
After using Index WP Users For Speed, notice that whenever I perform searching using WP Sheet Editors, it will always return inaccurate result. E.g, search based on specifically 1 Mobile Number, it should return only 1 result. Instead, it return all 90K.
I have check with the WP Sheet Editors developers, that’s what’s they claimed:
]]>we make the correct database query for the search, Index WP Users For Speed is intercepting and changing our database query. We can’t do anything about that because it’s external code. Index WP Users For Speed are intercepting all the database queries, even queries made by other plugins or WP itself.
Can I use the plugin for a news site? I have 11 editors, about 80,000 articles
Does it speed up the process of indexing a large number of posts with a small number of users?
I have a slow query regarding the number of posts on the dashboard :wp_count_posts()
WP_Query->get_posts()
WP_List_Table->months_dropdown()
Does the plugin help speed up these queries?
Note : I’m using Index WP MySQL For Speed
]]>Hello,
Please can you add support for the buddypress plugin by also optimizing speed in the frontend of members directory
Thanks
]]>Hey Guys!
I installed this plugin on our production site yesterday. It is a multi-site with 2 sites. A public facing site and a “membership” side.
I started by running the “Index MySQL for WordPress” companion plugin on both the public and members sites.
When I ran the first user index build with this plugin everything worked good on the “Production” site. It took about an hour and a half, but all ~330k of our users were indexed.
The notice properly went away after I watched it work it’s way up from 0 to 100.
As far as I can tell lasts nights index rebuild worked without an issue as well.
HOWEVER, since I installed the plugin the “members” side of the site has shown this notice on the backend:
“Background user index building in progress:?0% complete. You may use your site normally during index building.”
That 0% has not moved, and as far as I can tell from NewRelic there is no indexing process running.
The plugin says it’s multisite compatible, so I’m wondering if that notice is a false positive? Is there anything else we need to do to run the user indexing on the members side, did it run while the public facing sites indexing run?
Thanks so much!
-Simon
]]>Hello, I have added a custom pre_user_query to increase the search user speed, will it conflict with your plugin?
add_action('pre_user_query','rudr_extend_user_search');
function rudr_extend_user_search( $u_query ){
if ( $u_query->query_vars['search'] ){
$search_query = trim( $u_query->query_vars['search'], '*' );
if ( $_REQUEST['s'] == $search_query ){
global $wpdb;
$search_by = array( 'user_login','display_name');
$u_query->query_where = 'WHERE 1=1' . $u_query->get_search_sql( $search_query, $search_by, 'both' );
}
}
}
]]>
Hello, I have enabled the daily rebuild function. May I know the time is according to server time or worpdress time? WordPress has different timezone from server.
Also, I have checked wordpress scheduled corn job but did not find any job related to index user. How to check if daily rebuild is scheduled?
Thank you very much for your help!
]]>Hello, thanks for making this great plugin. It really make search user fast!
I have around 500k users on my site and increase around 4000 a month. Should I rebuild the index every night? How long will it take? Will it uses up all the CPU power and ram of the server?
I have installed the plugin for few days but the background user index building is only 40% complete.
My dedicate server: Google GCP AMD EPYC 7B12, 2 cores 12G Ram.
Thank you very much for your help!
]]>[25-Feb-2023 22:23:05 UTC] PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in wp-content/plugins/index-wp-users-for-speed/includes/indexer.php on line 41
]]>Hello,
I’m using PHP 8.1.6 and OpenLiteSpeed, and I have a PHP Fatal Error after installing and configuring this plugin.
The error is happening on the dashboard admin WP page.
Error Level: E_ERROR
Message: Uncaught TypeError: array_merge(): Argument #2 must be of type array, string given in /var/www/website(dot)com/htdocs/wp-content/plugins/index-wp-users-for-speed/admin/user-handler.php:678
Stack trace:
#0 /var/www/website(dot)com/htdocs/wp-content/plugins/index-wp-users-for-speed/admin/user-handler.php(678): array_merge()
#1 /var/www/website(dot)com/htdocs/wp-content/plugins/index-wp-users-for-speed/admin/user-handler.php(703): IndexWpUsersForSpeed\UserHandler->getRoleFilterSets()
#2 /var/www/website(dot)com/htdocs/wp-content/plugins/index-wp-users-for-speed/admin/user-handler.php(565): IndexWpUsersForSpeed\UserHandler->mungRoleFilters()
#3 /var/www/website(dot)com/htdocs/wp-includes/class-wp-hook.php(308): IndexWpUsersForSpeed\UserHandler->action__pre_get_users()
#4 /var/www/website(dot)com/htdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#5 /var/www/website(dot)com/htdocs/wp-includes/plugin.php(565): WP_Hook->do_action()
#6 /var/www/website(dot)com/htdocs/wp-includes/class-wp-user-query.php(277): do_action_ref_array()
#7 /var/www/website(dot)com/htdocs/wp-includes/class-wp-user-query.php(78): WP_User_Query->prepare_query()
#8 /var/www/website(dot)com/htdocs/wp-content/plugins/when-last-login/when-last-login.php(395): WP_User_Query->__construct()
#9 /var/www/website(dot)com/htdocs/wp-admin/includes/template.php(1409): When_Last_Login::admin_dashboard_widget_display()
#10 /var/www/website(dot)com/htdocs/wp-admin/includes/dashboard.php(271): do_meta_boxes()
#11 /var/www/website(dot)com/htdocs/wp-admin/index.php(203): wp_dashboard()
#12 {main}
thrown
File: /var/www/website(dot)com/htdocs/wp-content/plugins/index-wp-users-for-speed/admin/user-handler.php
Line: 678
]]>
Environment: Kinsta, , MySQL:10.5.18-MariaDB-1:10.5.18+maria~ubu2004?WordPress:5.8.3?WordPress database:49752?php:8.0.26
wp_users: 18,426 rows, wp_usermeta: 400,786 rows
Installed version: 1.1.3?
The plugin can be installed and loaded, but no option/setting is shown. The following PHP error are logged:
2023/01/12 03:54:21 [error] 76263#76263: *1839 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "wp_the_query" in /www/clonen_338/public/wp-includes/query.php on line 114" while reading response header from upstream, client: 175.159.181.163, server: staging-clonen-dev.kinsta.cloud, request: "GET /wp-admin/users.php?page=index-wp-users-for-speed HTTP/1.1", upstream: "fastcgi://unix:/var/run/php8.0-fpm-clonen.sock:", host: "staging-clonen-dev.kinsta.cloud:56149", referrer: "https://staging-clonen-dev.kinsta.cloud/wp-admin/users.php?page=users-user-role-editor.php"
2023/01/12 03:54:21 [error] 76263#76263: *1839 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function IndexWpUsersForSpeed\get_user_count() in /www/clonen_338/public/wp-content/plugins/index-wp-users-for-speed/includes/indexer.php:330
Stack trace:
#0 /www/clonen_338/public/wp-content/plugins/index-wp-users-for-speed/admin/views/page.php(37): IndexWpUsersForSpeed\Indexer::getNetworkUserCount()
#1 /www/clonen_338/public/wp-content/plugins/index-wp-users-for-speed/admin/admin.php(219): include_once('/www/clonen_338...')
#2 /www/clonen_338/public/wp-includes/class-wp-hook.php(303): IndexWpUsersForSpeed\Admin->render_admin_page('')
#3 /www/clonen_338/public/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
#4 /www/clonen_338/public/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#5 /www/clonen_338/public/wp-admin/admin.php(259): do_action('users_page_inde...')
#6 /www/clonen_338/public/wp-admin/users.php(11): require_once('/www/clonen_338...')
#7 {main}
thrown in /www/clonen_338/public/wp-content/plug" while reading upstream, client: 175.159.181.163, server: staging-clonen-dev.kinsta.cloud, request: "GET /wp-admin/users.php?page=index-wp-users-for-speed HTTP/1.1", upstream: "fastcgi://unix:/var/run/php8.0-fpm-clonen.sock:", host: "staging-clonen-dev.kinsta.cloud:56149", referrer: "https://staging-clonen-dev.kinsta.cloud/wp-admin/users.php?page=users-user-role-editor.php"
]]>
Hello Ollie! Thank you for creating this fantastic plugin!
My site have around 35,000 users but the users shown in the plugin is 10,001. I have followed your instruction to optimize the database. However there is no change in user number.
Will this affect the performance?
Also, there is no information in the setting page indicate where the user index is built or not. I would suggest a notice like Index WP MySQL For Speed would be clearer for users.
Thank you again for the plugin!
]]>We are seeing the following pretty regularly in our error log:
Notice: Undefined index: quickedit_threshold_limit in /wp-content/plugins/index-wp-users-for-speed/admin/user-handler.php on line 273
Happy to provide any details needed.
]]>We have 40,000 users on the site. However on the Index for Speed page under users it reports that we only have 7,209 users. Almost all users are subscribers. We are using WordPress Multisite (latest version)
]]>fabwintle (@fabwintle) reports:
Hi, I have just set up this plugin today and I’m getting the below error when the cron runs.
Uncaught Error: Call to a member function doTaskStep() on bool in /home/508763.cloudwaysapps.com/tmsajmvuew/public_html/wp-content/plugins/index-wp-users-for-speed/includes/tasks/task.php:19
Stack trace:
#0 /home/508763.cloudwaysapps.com/tmsajmvuew/public_html/wp-includes/class-wp-hook.php(307): IndexWpUsersForSpeed\index_wp_users_for_speed_do_task()
#1 /home/508763.cloudwaysapps.com/tmsajmvuew/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#2 /home/508763.cloudwaysapps.com/tmsajmvuew/public_html/wp-includes/plugin.php(524): WP_Hook->do_action()
#3 /home/508763.cloudwaysapps.com/tmsajmvuew/public_html/wp-cron.php(138): do_action_ref_array()
#4 {main}
thrown
– Error Level: E_ERROR
– Request: /wp-cron.php?doing_wp_cron=1665379880.7570960521697998046875
– Referrer: https://www.tourismtribe.com/wp-cron.php?doing_wp_cron=1665379880.7570960521697998046875
– File: /wp-content/plugins/index-wp-users-for-speed/includes/tasks/task.php
– Line: 19
What’s the minimum MySQL version needed for this plugin? Your other plugin requires 5.5.62+ https://www.ads-software.com/plugins/index-wp-mysql-for-speed/#which%20versions%20of%20mysql%20and%20mariadb%20does%20this%20support%3F
And does this support MyISAM tables? Or only InnoDB?
]]>Giulio Alfonso (@senjoralfonso) reports:
“Got error ‘PHP message: PHP Warning: The magic method IndexWpUsersForSpeed\\Indexer::__wakeup() must have public visibility in /httpdocs/wp-content/plugins/index-wp-users-for-speed/includes/indexer.php on line 405′”
]]>Hey Ollie!
Having an issue on a site with just 14 user accounts.
Kicked off the plugin and now seeing this admin alert on the backend…
Background user index building in progress: 1% complete. You may use your site normally during index building.
Any help appreciated.
TL
]]>Hello.
I have 80,000 users. The posts or pages admin page loads for about 4-5 seconds. I was hoping WP 6.0 fixes this, but there was no change after update. Then I found your plugin, seems to be using your new keys now, but still the same slow loading. Still more than 4 seconds to load.
See the queries please: https://res.cloudinary.com/djywkn92o/image/upload/v1654855700/users_pctszy.png
Is there anything we can do?
Do we need to keep this plugin enabled, as opposed to your Index WP MySQL plugin which can just be run once and turned off?
]]>Hello,
I’ve installed the plugin on the staging site that is not publicly accessed. I’ve activated this plugin and selected “immediately, then daily” option and saved the changes. After page reload there was a notice “Index rebuilding process starting”, but I can’t see any activity and doesn’t seems it’s doing anything.
I tried to run query “SELECT * FROM wp_usermeta
WHERE meta_key
= ‘wp_index_wp_users_for_speed_role_author’;” to see if these meta keays been created but no luck. The same thing happened on my local WP.
My first question is, the way I’ve tested it is correct?
And second, the site to run indexing has to be public? Can I trigger building indexes manually on the local WP?
Thank you very much!
]]>