You are currently viewing How to Optimise Autoloaded Options in WordPress for Improved Site Performance

How to Optimise Autoloaded Options in WordPress for Improved Site Performance

  • Post author:
  • Post last modified:November 14, 2024

How to Optimise Autoloaded Options in WordPress for Improved Site Performance

As a WordPress site owner, ensuring optimal performance is essential not only for providing a smooth user experience but also for ranking well on search engines. If you’ve ever checked your WordPress Site Health report, you may have noticed a warning about “autoloaded options.” These autoloaded options are settings stored in your database that load automatically with each page view. While they play a crucial role in making your site run, having too many or excessively large autoloaded options can slow down your site.

This guide aims to help you understand autoloaded options, why they might be slowing down your site, and how you can optimise them. By following a few steps, you can boost your site’s speed, reduce server load, and create a better experience for your visitors. Whether you’re a beginner or someone with moderate WordPress knowledge, this guide will walk you through the process with clear instructions and examples.

Table of Contents

Understanding Autoloaded Options in WordPress

If you’re a WordPress website owner looking to improve your site’s performance, you’ve probably come across a warning in the Site Health tool about “autoloaded options.” Autoloaded options are configuration settings that load automatically with every page view on your WordPress site. Having too many autoloaded options, especially large ones, can slow down your site, increase loading times, and affect user experience.

In this guide, we’ll walk you through understanding what autoloaded options are, how they affect your site, and, most importantly, how to optimise them. You’ll learn simple, actionable steps you can take, even if you don’t have extensive technical knowledge. Let’s dive into optimizing WordPress autoloaded options for a faster, more efficient site.

What Are Autoloaded Options in WordPress?

Autoloaded options are stored in the WordPress database, specifically in the wp_options table, and they load automatically on every page of your website. These options store various configuration settings for plugins, themes, and WordPress itself. While autoloaded options are useful for essential settings that need to be loaded on each page, having too many of them — or very large ones — can bog down your database and impact site performance.

In general, it’s best to keep your autoloaded options under 800 KB to avoid performance issues. However, on many sites, especially those with numerous plugins, the autoloaded options size can grow beyond this limit.

Why Optimise Autoloaded Options?

Optimizing autoloaded options is crucial for several reasons:

  • Improved Site Speed: Reducing autoloaded options means your server has less data to process on each page load, resulting in faster page loading times.
  • Better Database Performance: By cleaning up your wp_options table, your database can operate more efficiently, leading to faster responses and a more stable site.
  • Enhanced User Experience: A faster website leads to better user experience, which can increase visitor engagement and reduce bounce rates.
  • Boosted SEO: Page speed is a factor in search engine rankings, so a faster site may help improve your position in search results.

Step 1: Checking Autoloaded Options in Site Health

The WordPress Site Health tool is a great starting point for understanding the status of your autoloaded options. To access this tool:

  1. Go to your WordPress dashboard.
  2. Navigate to Tools > Site Health.
  3. Under Status, look for the critical issue titled “Autoloaded options could affect performance.”

This message will show you how many autoloaded options your site currently has and the total size of these options. If the size exceeds 800 KB, it’s a good indication that optimization is needed.

Step 2: Viewing Autoloaded Options in phpMyAdmin

To get a closer look at the specific autoloaded options, you’ll need access to your website’s database through phpMyAdmin, which is available on most web hosting control panels.

Steps to Access Autoloaded Options:

  1. Log into your web hosting control panel (such as cPanel) and open phpMyAdmin.
  2. Select your WordPress database.
  3. Click on the wp_options table (note: the table prefix wp_ might be different depending on your site configuration).
  4. In the SQL tab, you can run a query to see the largest autoloaded options:
SELECT option_name, LENGTH(option_value) AS size FROM `wp_options` WHERE autoload = 'yes' ORDER BY size DESC LIMIT 10;

This query will return the top 10 largest autoloaded options, helping you identify which entries are taking up the most space.

Step 3: Deciding Which Options to Optimise

Now that you have a list of autoloaded options, it’s time to decide which ones to keep, which ones to disable from autoload, and which ones to delete. Here’s a breakdown of each action:

1. Keep Essential Autoloaded Options

  • Core WordPress options (e.g., rewrite_rules and cron) are essential for the functionality of your site and should remain autoloaded.
  • Settings for plugins that affect every page, such as caching and security plugins, should also stay autoloaded.

2. Disable Non-Essential Autoloaded Options

  • Some plugin settings don’t need to load on every page. For example, options related to social media plugins or analytics may not need to be autoloaded.
  • To disable autoload for specific options, you can use the following SQL command in phpMyAdmin. Replace option_name with the actual name of the option you want to update:
UPDATE `wp_options` SET `autoload` = 'no' WHERE `option_name` = 'option_name';

Example: If you have an option called social_media_cache, you can disable its autoload with:

UPDATE `wp_options` SET `autoload` = 'no' WHERE `option_name` = 'social_media_cache';

3. Delete Unused or Outdated Options

  • If you find options related to plugins or themes you no longer use, you can safely delete them to free up database space.
  • To delete an option, use the following SQL command:
DELETE FROM `wp_options` WHERE `option_name` = 'option_name';

Example: To delete an option called old_plugin_settings, use:

DELETE FROM `wp_options` WHERE `option_name` = 'old_plugin_settings';

Note: Before making changes to your database, consider creating a backup to prevent accidental data loss.

Step 4: Clearing Cache Entries

Large cache entries are common culprits in bloated autoloaded options. Many plugins store cache data in autoloaded options, which can be removed or cleared.

Example: Removing Cache Entries

In phpMyAdmin, identify large cache entries (they often have names like cache_*). To delete them, use:

DELETE FROM `wp_options` WHERE `option_name` LIKE 'cache_%';

This command will remove any option names starting with “cache_,” freeing up space for more critical data.

Step 5: Using a Plugin for Routine Cleanup

For non-technical users, plugins like WP-Sweep or Advanced Database Cleaner can help with routine database maintenance. These plugins allow you to:

  • Clear transients (temporary cache entries).
  • Delete orphaned data.
  • Optimise your database tables for better performance.

Step 6: Regular Database Maintenance

Optimizing autoloaded options is not a one-time task. Over time, as you install and uninstall plugins, your autoloaded options can grow again. Make it a habit to:

  • Check your Site Health tool every few months.
  • Regularly run the SQL queries mentioned above to identify large autoloaded options.
  • Use a cleanup plugin periodically to keep your database in shape.

Conclusion

Optimizing autoloaded options in WordPress may seem technical, but it’s a highly effective way to improve site performance. By identifying non-essential autoloaded options and managing your database efficiently, you can reduce load times, enhance user experience, and even give your SEO a boost.

Remember, start by identifying the largest autoloaded options, keep essential ones, disable non-essential ones, and delete outdated data. With regular database maintenance, you’ll keep your WordPress site running smoothly for your visitors.

By following these steps, you can take control of your website’s performance and ensure a faster, more efficient experience for your users.

Why Your Support Matters and How You Can Help

Creating free, valuable content is core to our mission, but it requires resources to maintain and grow. Your support makes a difference in helping us continue this work. Here’s how you can contribute:

  • Use Affiliate Links: Support us at no extra cost by using our Amazon links for your purchases. We earn small commissions that help cover operational expenses.
  • Engage and Share: Like, comment, and share our content to expand our reach and attract more supporters.
  • Direct Support: Consider a donation or subscription to sustain the content you value. Even small contributions make a big impact.

Your engagement and support keep our martial arts guides, fitness tips, and nutrition advice accessible to thousands around the world.

Choose Your Preferred Method of Support:

  • PayPal: Quick and easy international transfers.
  • Wise: Cost-effective global transfers with transparent fees.
  • Monzo: A modern digital banking option for convenient payments.

Thank you for being an essential part of our community. Every donation, share, or interaction helps us move forward and continue sharing our passion. Your support truly means the world to us.

To show our appreciation, we continue to share our knowledge and experiences through our social media channels and my Pinterest page, which has 150k monthly visitors, offering martial arts resources, fitness tips, and health insights – all built over years of dedication.

Thank you for taking the time to read our story. Your kindness and support mean the world to us.
 
Return to the home section.