Title: WordPress database error – WPCQ users table missing
Last modified: May 8, 2023

---

# WordPress database error – WPCQ users table missing

 *  Resolved [Mark Howells-Mead](https://wordpress.org/support/users/markhowellsmead/)
 * (@markhowellsmead)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-wpcq-users-table-missing-2/)
 * I’m getting the following error message from time to time in a MultiSite installation.
   The shell script is run every five minutes, but the message is only sent to me
   via email irregularly. Everything is up-to-date, including WP CLI.
 * See also [https://wordpress.org/support/topic/wordpress-database-error-wpcq-users-table-missing/](https://wordpress.org/support/topic/wordpress-database-error-wpcq-users-table-missing/),
   which was closed a very short time after this issue was initially raised.
 *     ```wp-block-code
       WordPress database error Table 'sayhello_wp_2022.wpcq_2_users' doesn't exist for query 
       SELECT indexable_table.object_id
       FROM wpcq_2_yoast_indexable indexable_table
       LEFT JOIN wpcq_2_users AS source_table
       ON indexable_table.object_id = source_table.ID
       WHERE source_table.ID IS NULL
       AND indexable_table.object_id IS NOT NULL
       AND indexable_table.object_type = 'user'
       LIMIT 1000 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('wpseo_start_cleanup_indexables'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Cleanup_Integration->run_cleanup, Yoast\WP\SEO\Integrations\Cleanup_Integration->Yoast\WP\SEO\Integrations\{closure}, Yoast\WP\SEO\Integrations\Cleanup_Integration->clean_indexables_for_object_type_and_source_table
       ```
   

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

 *  Thread Starter [Mark Howells-Mead](https://wordpress.org/support/users/markhowellsmead/)
 * (@markhowellsmead)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-wpcq-users-table-missing-2/#post-16719378)
 * I have carried out the suggestion raised by [@maybellyne](https://wordpress.org/support/users/maybellyne/).
   As this is a multisite installation: do I need to carry out these steps for every
   site in the installation? The Tools panel is not available at network level.
 *  [joost de keijzer](https://wordpress.org/support/users/joostdekeijzer/)
 * (@joostdekeijzer)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-wpcq-users-table-missing-2/#post-16719704)
 * [@markhowellsmead](https://wordpress.org/support/users/markhowellsmead/) and 
   [@maybellyne](https://wordpress.org/support/users/maybellyne/) I have the same
   issue with a WordPress multisite.
 * I feel the suggestion of [@maybellyne](https://wordpress.org/support/users/maybellyne/)
   in the other thread is not very useful.
 * Looking into the plugin code, there is a bug for multisite installs:
 * File `src/integrations/cleanup-integration.php` queues a cleanup task for user
   indexes without a user (search for `clean_orphaned_user_indexables_without_wp_user`
   in that file).
 * The code run does not account for the fact that in a multisite environment there
   is **only one** user table (eg. `wp_users`) and tries to join a non-existent 
   users table (eg. `wp_2_users`).
 * I guess the clean method `Cleanup_Integration::clean_indexables_for_object_type_and_source_table`
   should either handle the users table for multisite differently or there should
   be a separate cleanup function for the users table that takes multisite into 
   account.
 * Hope this helps fix things quickly,
   Joost
 *  [monbauza](https://wordpress.org/support/users/monbauza/)
 * (@monbauza)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-wpcq-users-table-missing-2/#post-16722987)
 * Thanks for bringing this issue to our attention, [@markhowellsmead](https://wordpress.org/support/users/markhowellsmead/)
   and [@joostdekeijzer](https://wordpress.org/support/users/joostdekeijzer/). We’ve
   been able to reproduce the issue in our testing environment and created a [bug report](https://github.com/Yoast/wordpress-seo/issues/20283)
   for our developers. As it’s a confirmed bug I’ll close this forum topic. Feel
   free to follow the progress of the report on the above link.

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

The topic ‘WordPress database error – WPCQ users table missing’ is closed to new
replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [indexables](https://wordpress.org/support/topic-tag/indexables/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * 3 replies
 * 3 participants
 * Last reply from: [monbauza](https://wordpress.org/support/users/monbauza/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-wpcq-users-table-missing-2/#post-16722987)
 * Status: resolved