The SEO Framework · KB

★︎ Start with TSF
  • Extensions
  • Documentation
  • Blog
  • Pricing
Knowledge Base › Data stored in your database

Data stored in your database — Contents

  • <span class=nowrap translate=no>The SEO Framework</span>
    • Options
      • Stale Options
      • Autoloaded Options
    • Post Metadata
    • Term Metadata
    • User Metadata
    • Transients
      • Stale transients
      • Autoloaded transients
  • <span class=nowrap translate=no>Extension Manager</span>
    • Options
      • Stale Options
      • Autoloaded Options
      • Limbo Options
    • Post metadata
    • Term metadata
    • Transients
      • Site Transients
      • Stale Transients

Data stored in your database

Published on June 5, 2020
Revised on May 1, 2022

With The SEO Framework, we’ll never delete data from your database when you uninstall any of our plugins. Because might you ever need to reinstall the plugin(s), then you can continue where you left off.

However, if you must inspect, change, or even delete options from The SEO Framework product family, below we list where to look. Make a backup of your database before using any of the removal snippets!

The SEO Framework

The SEO Framework is a feature-complete SEO plugin for WordPress. You can get it from WordPress.org. The lists below apply to The SEO Framework v4.0 and higher, but most entries also pertain to (much) earlier versions.

Options

WordPress options are stored in table {$prefix}options. Below, we list the option_name column values.

Stale Options

This option is only loaded when requested by the plugin. Otherwise, it is dormant/inert/stale and does not affect database performance whatsoever. Briefly, it means you can safely keep this data on your site forever. However, it is a critical key in the plugin upgrade chain–so, if you clean up your database, remove this too.

option_name Purpose
the_seo_framework_initial_db_version DB version number of TSF when it was first active.

Autoloaded Options

WordPress loads all autoloaded options in one single database query. Therefore, these options will always be loaded and can take up a negligible amount of server resources.

option_name Purpose
autodescription-site-settings All global SEO options.
autodescription-updates-cache Transient objects that need constant revalidation, such as notices and conflict checks.
the_seo_framework_tested_upgrade_version Latest DB version tested against for compatibility, used to retest environment on mismatch.
the_seo_framework_upgraded_db_version Latest DB version upgraded to, used to test for plugin upgrades.

Removal

To delete these, add this snippet to your site, and visit your admin dashboard once:

add_action( 'admin_init', function() {
	delete_option( 'the_seo_framework_initial_db_version' );
	delete_option( 'autodescription-site-settings' );
	delete_option( 'autodescription-updates-cache' );
	delete_option( 'the_seo_framework_tested_upgrade_version' );
	delete_option( 'the_seo_framework_upgraded_db_version' );
} );

After the options are deleted, you should remove the snippet. If you leave the snippet active on your site, it can affect its performance; but, it won’t cause any harm.

Post Metadata

WordPress post metadata values are stored in table {$prefix}postmeta. WordPress loads all the post’s metadata at once when any value of the post is requested. Below, we list the meta_key column values.

meta_key Purpose
_genesis_title The custom SEO title. Also affects Open Graph and Twitter titles when they’re undefined.
_tsf_title_no_blogname Removes blogname from title. Also affects Open Graph and Twitter titles when they’re undefined.
_genesis_description The custom SEO description. Also affects Open Graph and Twitter descriptions when they’re undefined.
_genesis_canonical_uri The custom canonical URL. Also affects the Open Graph URL.
redirect The 301 redirect location.
_social_image_url The social image URL. Also affects Schema.org structured data, Open Graph, and Twitter image URLs.
_social_image_id The social image ID. Used to obtain extra image metadata for Open Graph and Schema.org structured data. Only populates when using the image editor modal.
_genesis_noindex Whether the noindex directive should be automatically determined, enabled, or disabled.
_genesis_nofollow Whether the nofollow directive should be automatically determined, enabled, or disabled.
_genesis_noarchive Whether the noarchive directive should be automatically determined, enabled, or disabled.
exclude_local_search Removes post from local on-site search results.
exclude_from_archive Removes post from local on-site archive listings.
_open_graph_title The custom Open Graph title. Also affects Twitter title when it’s undefined.
_open_graph_description The custom Open Graph description. Also affects Twitter description when it’s undefined.
_twitter_title The custom Twitter title.
_twitter_description The custom Twitter description.
_primary_term_{$taxonomy} The post’s primary term ID for the {$taxonomy}.

Side notes

Unlike term and user meta settings–which follow a NoSQL-like Key-value store database model–, these entries follow an archaic EAV database model. Under controlled circumstances, neither is worse. However, since we’re sharing the table with other plugins this is prone to collisions, and it’s an overal bad implementation which we need to resolve. Until then, the aforementioned entries apply.

You probably have also noticed that some meta keys have underscore prefixes, and others hold the genesis name. These are discrepancies with a legacy background.

Removal

Due to the complex nature of these entries, and because some keys might be shared with other plugins or themes, we do not recommend removing this data. Precisely this issue is what’s preventing us from moving to the new NoSQL-like system rapidly.

Nevertheless, to remove all these entries, use the code below, and visit your admin dashboard (once).
Warning: This code hasn’t been battle-tested. Make a backup of your database before proceeding!

// Make a backup of your database before using this!
add_action( 'admin_init', function() {
	global $wpdb;

	$rows = [ '_genesis_title', '_tsf_title_no_blogname', '_genesis_description', '_genesis_canonical_uri', 'redirect', '_social_image_url', '_social_image_id', '_genesis_noindex', '_genesis_nofollow', '_genesis_noarchive', 'exclude_local_search', 'exclude_from_archive', '_open_graph_title', '_open_graph_description', '_twitter_title', '_twitter_description', ];
	$like = [ '_primary_term_%', '' ];

	$escsql_map_str = function( $v ) use ( $wpdb ) {
		return $wpdb->prepare( "%s", $wpdb->_escape( $v ) );
	};
	$escsql_map_like = function( $v ) use ( $wpdb ) {
		$v = $wpdb->_escape( $v );
		return $v ? $wpdb->prepare( "OR `meta_key` LIKE %s", $v ) : '';
	};

	$wpdb->query(
		vsprintf(
			"
			DELETE FROM {$wpdb->postmeta}
			WHERE `meta_key` IN (%s) %s
			",
			[
				implode(
					', ',
					array_map( $escsql_map_str, $rows )
				),
				implode(
					' ',
					array_map( $escsql_map_like, $like )
				),
			]
		)
	);
} );

After all the post metadata is deleted, you should remove the snippet. If you leave the snippet active on your site, it can affect its performance significantly; but, it won’t cause any (more) harm.

Term Metadata

WordPress term metadata values are stored in table {$prefix}termmeta. WordPress loads all the term’s metadata at once when any value of the term is requested. Below, we list the meta_key column value.

meta_key Purpose
autodescription-term-settings Holds all the term’s options for The SEO Framework.

Removal

To delete these, add this snippet to your site, and visit your admin dashboard once:

add_action( 'admin_init', function() {
	delete_metadata( 'term', 0, 'autodescription-term-settings', false, true );
} );

After all the term metadata is deleted, you should remove the snippet. If you leave the snippet active on your site, it can affect its performance; but, it won’t cause any harm.

User Metadata

WordPress user metadata values are stored in (main blog’s only) table {$prefix}usermeta. WordPress loads all the user’s metadata at once when any value of the user is requested. Below, we list the meta_key column value.

meta_key Purpose
autodescription-user-settings Holds all the user’s options for The SEO Framework, among social settings and preferences.
meta-box-order_toplevel_page_theseoframework-settings Holds the user’s prefered meta box order for The SEO Framework’s settings page.
closedpostboxes_toplevel_page_theseoframework-settings Holds the user’s closed meta boxes list for The SEO Framework’s settings page.
metaboxhidden_toplevel_page_theseoframework-settings Holds the user’s hidden meta boxes screen options for The SEO Framework’s settings page.

Removal

To delete these, add this snippet to your site, and visit your admin dashboard once:

add_action( 'admin_init', function() {
	delete_metadata( 'user', 0, 'autodescription-user-settings', false, true );
	delete_metadata( 'user', 0, 'meta-box-order_toplevel_page_theseoframework-settings', false, true );
	delete_metadata( 'user', 0, 'closedpostboxes_toplevel_page_theseoframework-settings', false, true );
	delete_metadata( 'user', 0, 'metaboxhidden_toplevel_page_theseoframework-settings', false, true );
} );

After all the user metadata is deleted, you should remove the snippet. If you leave the snippet active on your site, it can affect its performance; but, it won’t cause any harm.

Transients

Transients are (often) short-lived, non-persistent database entries. They’re meant to hold data between site sessions. These entries can have an expiry date, and WordPress periodically checks for these dates to remove them from the database.

Stale transients

Stale transients expire automatically and are only queried from the database when requested explicitly. So, you do not need to worry about these when you want to clean up your database.

option_name Purpose Timeout
tsf_upgrade_lock Locks the upgrader, so no two upgrades can run simultaneously. 5 minutes
tsf_throttle_ping_{$blog_id}_{$locale} Limits pinging of the sitemap to only once per expiry time. 1 hour
tsf_sitemap_{$revision}_{$blog_id}_{$locale} Holds a cached copy of the sitemap output, so it won’t have to regenerate again. The SEO Framework clears this transient whenever you publish or update a post, among other actions. 1 week

Autoloaded transients

These transients never expire and are automatically loaded with all other WordPress options.

option_name Purpose
tsf_exclude_{$revision}_{$blog_id}_{$locale} Holds all IDs of posts for search/archive exclusion.

Removal

Since stale transients are volatile, we won’t bother including them in this snippet.

add_action( 'admin_init', function() {
	global $wpdb;

	$wpdb->query(
		$wpdb->prepare(
			"DELETE FROM $wpdb->options WHERE `option_name` LIKE %s",
			$wpdb->esc_like( '_transient_tsf_exclude_' ) . '%'
		)
	);
	$wpdb->query(
		$wpdb->prepare(
			"DELETE FROM $wpdb->options WHERE `option_name` LIKE %s",
			$wpdb->esc_like( '_transient_timeout_tsf_exclude_' ) . '%'
		)
	);
} );

Extension Manager

Extension Manager extends The SEO Framework with extensions. You can get it from our network. The lists below apply to Extension Manager v2.4 and higher, but most entries also pertain to (much) earlier versions.

For summarized context of any of these options, please refer to the descriptions above.

Options

Stale Options

option_name Purpose
tsf-extension-manager-extension-s-settings Holds options that aren’t actively used on the front-end. For example, Local uses this to cache its complex settings, but stores the parsed JSON output elsewhere.

Autoloaded Options

option_name Purpose
tsf-extension-manager-settings All Extension Manager options.
tsfem_i_{$key} The instance of the Extension Manager options, used to test for integrity when moving between sites.
tsf-extension-manager-extension-settings All extension options.
tsfem_current_db_versions Latest DB versions of the plugin and extensions that has been upgraded to, used to test for plugin and extension upgrades.

Limbo Options

These options switch between stale and autoloaded–only when they’re filled in, they’re autoloaded. This takes a load off from your database, because when these options are filled in, they might get the same data refilled constantly. However, these options aren’t critical to any public part of your website, so they default to a stale state.

option_name Purpose
tsfem_e_focus_ajax_error_notice_option Holds AJAX error notices for the Focus extension. This should never be populated, since this extension works via AJAX only–it always returns errors instantly, without storing them for a subsequent request.
tsfem_e_local_error_notice_option Holds error notices for the Local extension.
tsfem_e_monitor_error_notice_option Holds error notices for the Monitor extension.
tsfem_error_notice_option Holds error notices for the Extension Manager.
tsfem_extension_settings_error_notice_option Holds error notices for the Extension Settings page.

Removal

To delete these, add this snippet to your site, and visit your admin dashboard once:

add_action( 'admin_init', function() {
	global $wpdb;
	
	$wpdb->query(
		$wpdb->prepare(
			"DELETE FROM $wpdb->options WHERE `option_name` LIKE %s",
			$wpdb->esc_like( 'tsfem_i_' ) . '%'
		)
	);

	delete_option( 'tsf-extension-manager-settings' );
	delete_option( 'tsf-extension-manager-extension-settings' );
	delete_option( 'tsfem_current_db_versions' );
	delete_option( 'tsfem_e_focus_ajax_error_notice_option' );
	delete_option( 'tsfem_e_local_error_notice_option' );
	delete_option( 'tsfem_e_monitor_error_notice_option' );
	delete_option( 'tsfem_error_notice_option' );
	delete_option( 'tsfem_extension_settings_error_notice_option' );
} );

After the options are deleted, you should remove the snippet. If you leave the snippet active on your site, it can affect its performance; but, it won’t cause any harm.

Post metadata

meta_key Purpose
_tsfem-extension-post-meta Holds all the post’s options for extensions.

Removal

To delete these, add this snippet to your site, and visit your admin dashboard once:

add_action( 'admin_init', function() {
	delete_metadata( 'post', 0, '_tsfem-extension-post-meta', false, true );
} );

After all the term metadata is deleted, you should remove the snippet. If you leave the snippet active on your site, it can affect its performance; but, it won’t cause any harm.

Term metadata

meta_key Purpose
_tsfem-extension-term-meta Holds all the term’s options for extensions.

Removal

To delete these, add this snippet to your site, and visit your admin dashboard once:

add_action( 'admin_init', function() {
	delete_metadata( 'term', 0, '_tsfem-extension-term-meta', false, true );
} );

After all the term metadata is deleted, you should remove the snippet. If you leave the snippet active on your site, it can affect its performance; but, it won’t cause any harm.

Transients

All transients in Extension Manager are stale and volatile; they expire, aren’t autoloaded, and WordPress cleans them up automatically.

Site Transients

Site transients are transients that can be accessed globally on a WordPress Multisite network. They act like normal transients everywhere else.

option_name Purpose Timeout
tsfem-updater-cache Caches the response of the Extension Manager update service. 20 minutes

Stale Transients

option_name Purpose Timeout
tsfem_articles_news_sitemap_{$blog_id}_{$locale} Holds a cached copy of the sitemap output, so it won’t have to regenerate again. Articles clears its output whenever you update or publish a post, among other actions. 1 hour
tsf-extension-manager-auto-activate-timeout Used to delay failed attempts of automatic API service connections when using global constant definitions. 5 minutes
tsfem_latest_seo_feed Used to delay fetching our XML feed for 30 minutes when an attempt has failed, or store the output for a day. 30 minutes or 1 day
Filed Under: Extension Manager, The SEO Framework

Other articles

  • The SEO Framework

    • Headless mode
    • All you must know about sitemaps
    • Translation plugin compatibility
    • Explaining the description generator
    • Structured data supported by The SEO Framework
  • Extension Manager

    • Are there unlimited-site licenses for Extension Manager?
    • How to install Extension Manager

Commercial

The SEO Framework
Trademark of CyberWire B.V.
Leidse Schouw 2
2408 AE Alphen a/d Rijn
The Netherlands
KvK: 83230076
BTW/VAT: NL862781322B01

Twitter  GitHub

Professional

Pricing
About
Support
Press

Rational

Privacy Policy
Terms and Conditions
Refund Policy

Practical

Documentation
TSF on WordPress
TSF on GitHub
TSFEM on here
TSFEM on GitHub
Feature Highlights

Connected in 2022 › The SEO Framework