How to Fix Yoast SEO Database Performance Issues and Large wpseo_taxonomy_meta
Content
Understanding Yoast SEO Database Performance Issues
Many WordPress users experience performance problems related to the Yoast SEO plugin's database usage. Common symptoms include slow page loads, slow admin updates, and even server errors. These issues often stem from two primary sources: the bloated wpseo_taxonomy_meta option in the wp_options table and the large custom indexable tables (wp_yoast_indexable, wp_yoast_seo_links).
Why Does This Happen?
1. The wpseo_taxonomy_meta Autoload Problem
The wpseo_taxonomy_meta field stores SEO data (titles, meta descriptions, focus keyphrases) for all your categories, tags, and other taxonomies. A known issue exists where this data is not automatically cleaned up when you delete taxonomy terms. Over time, as you create and delete terms, this single database entry can grow very large (often over 100KB+). Because this option is marked for autoload, WordPress loads it into memory on every page request, which can significantly slow down your site.
2. Large Indexable Tables
Since version 14.0, Yoast SEO stores metadata in custom tables (wp_yoast_indexable, wp_yoast_seo_links, etc.) for performance. While this is designed to make page loads faster, the process of populating and maintaining these tables can sometimes cause slow queries, especially on large sites. Common slow queries involve indexing operations and sitemap generation.
Common Solutions and Troubleshooting Steps
Solution 1: Clean Up the wpseo_taxonomy_meta Option
Warning: This involves editing your database directly. Always create a full backup before proceeding.
- Access your database via phpMyAdmin or a similar tool provided by your host.
- Navigate to the
wp_optionstable. - Find the row where the
option_nameiswpseo_taxonomy_meta. - The
option_valuecontains serialized PHP data. You need a tool that can safely edit serialized data, such as the "Search and Replace" script from Interconnect/IT. - Within the serialized array, you can carefully remove entries for taxonomy terms that no longer exist on your site. Do not modify data for existing terms.
- After cleaning, you can also set the
autoloadfield for this row tonoto prevent it from loading on every page. Be aware that this might cause the plugin to need to fetch this data on-demand.
Solution 2: Reset and Rebuild Indexables
If you are encountering errors about missing columns (e.g., inclusive_language_score, blog_id) or slow queries related to the indexable tables, resetting them can often help.
- Install and activate the free Yoast Test Helper plugin.
- Go to Tools > Yoast Test in your WordPress admin.
- In the Yoast SEO section, click the "Reset indexables tables & migrations" button. The page will reload.
- Next, go to SEO > Tools in your admin menu.
- Under "Optimize SEO Data," click the "Start SEO data optimization" button. This will re-populate the tables correctly.
Solution 3: Address Specific Slow Queries
If Query Monitor or your host is identifying specific slow queries (e.g., during sitemap generation or post updates), these are often related to the indexing process. Ensuring the optimization process (Solution 2) has completed can resolve many of these. For very large sites, the indexing process may need to run during low-traffic periods.
Solution 4: For Missing Tables or Severe Errors
If you see errors that a table doesn't exist (e.g., yoast_indexable), it often indicates a failed installation or upgrade. The most reliable fix is to:
- Deactivate the Yoast SEO plugin.
- Delete the plugin. (Your SEO data remains in the database).
- Reinstall a fresh copy of the plugin from the WordPress repository.
- Reactivate it. The plugin should attempt to recreate the missing tables.
- Run the SEO data optimization tool as described in Solution 2.
When to Consider a Bug Report
Some issues, like the wpseo_taxonomy_meta not being cleaned up automatically or specific performance problems in the author watcher for large sites, are acknowledged bugs. If the solutions above do not resolve your issue, and you believe you've found a bug, you can report it on the Yoast SEO GitHub repository for the development team to review. Be sure to provide detailed information about your environment and the problem.
By following these steps, you can mitigate the most common database-related performance issues caused by the Yoast SEO plugin and keep your site running smoothly.
Related Support Threads Support
-
Keep giving this error in LOGhttps://wordpress.org/support/topic/keep-giving-this-error-in-log/
-
Yoast DB Errorhttps://wordpress.org/support/topic/yoast-db-error/
-
WordPress database error Unknown columnhttps://wordpress.org/support/topic/wordpress-database-error-unknown-column-9/
-
Performance Issue Related to Yoast SEO – Slow Query on Sitemap Generationhttps://wordpress.org/support/topic/performance-issue-related-to-yoast-seo-slow-query-on-sitemap-generation/
-
WordPress database error Tablehttps://wordpress.org/support/topic/wordpress-database-error-table-18/
-
Do these tables in the database belong to your plugin?https://wordpress.org/support/topic/do-these-tables-in-the-database-belong-to-your-plugin/
-
Yoast SEO Errors in logs on 14 GB!https://wordpress.org/support/topic/yoast-seo-errors-in-logs-on-14-gb/
-
Slow database queries slow down websitehttps://wordpress.org/support/topic/slow-database-queries-slow-down-website/
-
wpseo tableshttps://wordpress.org/support/topic/wpseo-tables/
-
Cleaning Databasehttps://wordpress.org/support/topic/cleaning-database-3/
-
Slow query issue when setting up sitemaphttps://wordpress.org/support/topic/slow-query-issue-when-setting-up-sitemap/
-
Yoast slow queryhttps://wordpress.org/support/topic/yoast-slow-query/
-
wpseo_taxonomy_meta and autoloaded data issuehttps://wordpress.org/support/topic/wpseo_taxonomy_meta-and-autoloaded-data-issue/
-
yoast_head is null for /users/ requests in WP REST APIhttps://wordpress.org/support/topic/yoast_head-is-null-for-users-requests-in-wp-rest-api/
-
wp_yoast_indexable has Half a Million rowshttps://wordpress.org/support/topic/wp_yoast_indexable-has-half-a-million-rows-2/
-
DB yoast_indexable & yoast_indexable_hierarchyhttps://wordpress.org/support/topic/db-yoast_indexable-yoast_indexable_hierarchy/
-
Causing Server 500 Errorhttps://wordpress.org/support/topic/causing-server-500-error/
-
YOAST causing WordPress database error Commands out of synchttps://wordpress.org/support/topic/wordpress-database-error-commands-out-of-sync-37/
-
Yoast slow page updatehttps://wordpress.org/support/topic/yoast-slow-page-update/
-
Database Errorhttps://wordpress.org/support/topic/database-error-413/
-
[Column ‘ancestor_id’ cannot be null]https://wordpress.org/support/topic/column-ancestor_id-cannot-be-null-3/
-
wp_options wpseo_taxonomy_metahttps://wordpress.org/support/topic/wp_options-wpseo_taxonomy_meta/
-
Yoast database table is missinghttps://wordpress.org/support/topic/yoast-database-table-is-missing/
-
safely deleting old postmeta entrieshttps://wordpress.org/support/topic/safely-deleting-old-postmeta-entries/
-
Tired of Yoasthttps://wordpress.org/support/topic/tired-of-yoast/
-
yoast_seo_links Tablehttps://wordpress.org/support/topic/yoast_seo_links-table/
-
Massive performance issue in Indexable_Author_Watcher for pages with a large numhttps://wordpress.org/support/topic/massive-performance-issue-in-indexable_author_watcher-for-pages-with-a-large-num/