The most likely cause is a missing or inaccessible Rank Math database table, often rank_math_analytics_objects. Start by updating Rank Math and taking a database backup, then use Rank Math’s built-in database table recreation tool before making manual database changes.
Quick checks before changing anything
Check the exact error first. In many cases the log says a table such as wp_rank_math_analytics_objects “doesn’t exist” or that a query failed. The wp_ part may be different on your site because WordPress table prefixes are configurable.
Look in these places:
- Your hosting panel’s PHP error log or WordPress error log.
- Rank Math dashboard notices in
Rank Math SEO > Dashboard. - WordPress admin notices after updating or reactivating Rank Math.
- Site Health under
Tools > Site Healthfor database or scheduled action problems.
If logging is not enabled, WordPress documents the debug constants in its debugging guide. Do not leave public error display enabled on a live site.
Before you change settings or tables, create a database backup from your host, backup plugin, or phpMyAdmin. This issue usually touches plugin-created tables, but the safest fixes still write to the database.
Safest fix order
1. Update Rank Math first
Go to Dashboard > Updates or Plugins > Installed Plugins and update Rank Math SEO.
This matters because a failed or partial plugin update can leave the code expecting a table that was not created yet. WordPress explains the normal plugin update flow in its plugin management documentation.
If you saw a security scanner warning for an older Rank Math version, update before troubleshooting the table error. Do not try to repair old plugin code manually.
2. Recreate Rank Math database tables
Rank Math provides a built-in repair path for missing plugin tables. Use that before opening phpMyAdmin.
In wp-admin:
- Go to
Rank Math SEO > Status & Tools. - Open the
Database Toolstab. - Find the option to recreate missing database tables.
- Run the tool once.
- Clear any page cache or object cache, then reload the page that was triggering the error.
Rank Math’s own documentation covers this workflow in its guide to recreating missing database tables.
If the tool is not visible, switch Rank Math to Advanced Mode from its dashboard/settings area, then check Status & Tools again.
3. Disable and re-enable only the affected Rank Math module
If the error is tied to analytics, do not deactivate the whole SEO plugin immediately. First try the narrower change:
- Go to
Rank Math SEO > Dashboard. - Locate the Analytics module.
- Turn it off.
- Save, reload wp-admin, then turn it back on.
- Run the database table recreation tool again if the error remains.
This can trigger Rank Math’s setup checks without changing unrelated SEO settings such as titles, schema, redirects, or sitemap behavior.
4. Check the table prefix and database permissions
If Rank Math still reports a query problem, compare the table name in the error with your real WordPress table prefix.
For example:
- Error mentions
wp_rank_math_analytics_objects. - Your database tables use
abc123_posts,abc123_options, and similar names. - Rank Math should be using
abc123_rank_math_analytics_objects, notwp_rank_math_analytics_objects.
A prefix mismatch can happen after migration, staging push, or database search-and-replace work. At that point, contact your host or developer before editing database names manually.
Also ask the host to confirm that the WordPress database user can create and alter tables. Rank Math cannot repair its own tables if the database user has read-only or limited permissions.
Optional SSH check
Use this only if you already have SSH and WP-CLI access. The normal wp-admin repair path is safer for most site owners.
List Rank Math-related tables:
wp db query "SHOW TABLES LIKE '%rank_math%';"
If no Rank Math analytics tables appear, run the repair tool in wp-admin rather than creating tables by hand. Manual table creation is risky because plugin schemas can change between versions.
You can also check whether Rank Math is active:
wp plugin status seo-by-rank-math
WP-CLI documents plugin status commands in the official wp plugin status reference.
How to confirm the repair worked
After updating and recreating tables:
- Reload the wp-admin page that showed the notice.
- Check the PHP error log again.
- Open a few posts and pages in wp-admin.
- Visit the front end while logged out or in a private browser window.
- If the issue was Analytics-related, open
Rank Math SEO > Analyticsand confirm the screen loads without a database error.
You do not need the Analytics numbers to repopulate instantly. The important first sign is that the missing-table query error stops repeating.
Rollback and recovery notes
If the site breaks after an update, restore the database and plugin files from the backup you made before troubleshooting. If only wp-admin is broken, use SFTP or your hosting file manager to rename the Rank Math plugin folder temporarily:
wp-content/plugins/seo-by-rank-math
Rename it to something like:
seo-by-rank-math-disabled
That disables the plugin so you can access wp-admin again. Rename it back only after you are ready to continue troubleshooting.
Do not delete Rank Math database tables unless Rank Math support or your developer has confirmed they are safe to remove. Deleting plugin tables can remove analytics history, redirects, or other stored plugin data depending on the table.
When to contact support
Contact Rank Math support if the built-in table recreation tool runs but the same Rank Math table error returns.
Contact your host if:
- The database user cannot create tables.
- phpMyAdmin shows database corruption warnings.
- The error started after a migration or staging push.
- The table prefix in the error does not match the live site’s database prefix.
- The server logs show broader MySQL or MariaDB connection failures outside Rank Math.
Contact a developer before manual database edits. The repair target is narrow, but a wrong table rename or prefix change can break the whole WordPress install.