How to remove the autoload from those options that don’t need it
What is the autoload?
If you open the database of your WordPress website with PHPMyAdmin and check the table wp_options, you will see something similar to the following picture
Some options have the autoload set to “no” or false, and other ones to “yes” or true.
When you visit a page, if the Autoload cache is still empty, WordPress loads all the options that have the autoload set to “yes” or true, with one single query, and saves the result in the Autoload cache. Next time when an autoloaded option is called during the same page request, it will be taken from the cache, and the database will not be queried again.
This would be very nice because with one single query you would get all the options that you always need. If you need those options on all the pages, this method would be perfect.
But as always, not all the plugins and themes are perfectly coded, and many of them abuse the autoload. They even use it for options that are called only in the backend, or in rare situations.
If those options are not so big, the impact will not be dramatic, but many times you may see huge autoloaded options that slow down all the pages without any need to load them everywhere.
In some situations, the plugin or the theme that introduced those options is even not active anymore, but they left that bloat in the database.
How to get rid of autoloaded options that should not be autoloaded.
If you are a PRO user, you can manage the autoload in the following way:
- Go to Freesoul Deactivate Plugins => Database Icon => Autoload
- Uncheck the options that should not be autoloaded
- Save the options
How to check which plugin adds a specific option to the database.
By clicking on the question mark icon next to an option name, FDP will tell you which files are calling that option when you visit the home page. You will understand if it’s a plugin, and in this case which plugin, or if it’s the theme or the core.
This will be useful to decide if a certain option should be autoloaded or not so. If for example an autoloaded option comes from the contact form plugin, and you have a contact form only in the contact page, remove the autoload from that option.