wp_options table stores several types of data for your site, including:
- settings for your plugins, widgets, and themes
- temporarily cached data
- site URL and home URL
- category settings
- autoloaded data
The default prefix of the
options table is
wp_. The prefix of the
options table may vary if you are using a custom prefix, such as
If your website is running slow and you receive the following message in the database stats:
consider autoloading only necessary options, follow the steps below.
Check the size of your autoloaded data:
Log in to your MySQL client.
Select your database (by default
pantheon) and then click the
Run the following code to see the total autoloaded data and data count:
SELECT 'autoloaded data in KiB' as name, ROUND(SUM(LENGTH(option_value))/ 1024) as value FROM wp_options WHERE autoload='yes' UNION SELECT 'autoloaded data count', count(*) FROM wp_options WHERE autoload='yes';
If your autoloaded data is less than 1 MB, it is unlikely that autoloaded data is slowing down your site. If your data is higher than 1 MB, you have a high number of options being autoloaded, and it is most likely slowing down your site.
Run the following code to see the top items with autoloaded data:
SELECT option_name, length(option_value) FROM wp_options WHERE autoload='yes' ORDER BY length(option_value) DESC LIMIT 20;
Run the following code if you want to turn off autoload for an item:
update_option( 'wp_option', 'value' ); to be update_option('wp_option', 'value', 'no');
You must specify
noin the third parameter or it will automatically default to
We recommend minimizing your autoloaded data to increase to your site's performance. We've provided a few tips for reducing your autoloaded data below.
Redirect plugins are common culprits for causing increased autoloaded cache. You can clean up your excess autoloaded data by redirecting your site configuration with PHP.
Transients cache data for a set amount of time in WordPress. Although transients are only stored temporarily, they can become excessively large and slow down your site.
Run the following code to clean up your transient data:
SELECT * FROM `wp_options` WHERE `autoload` = 'yes' AND `option_name` LIKE '%transient%'
You can use Pantheon's Object Cache to minimize the use of transient data inside the
You can also use Pantheon's Professional Services to reduce requests to your CMS by moving page redirects to the edge.