wp_set_option_autoload_values() can be used to enable or disable autoload on an option by option basis.
It’s also possible to directly edit the options table via phpMyAdmin, though this is usually strongly discouraged due to the risk of corrupting the DB. If you choose to do this, please make a full backup of your DB before proceeding, or at the very least backup your options table.
Thank you @bcworkz . Where would I install this code on the site? I called my hosting company and there were no help with the above issue. They told me the issue is because I am using shared hosting and I can’t alter it because it would alter everyone’s site and then they said I needed to purchase VPN hosting to fix it. (This of course being a complete lie, but this is the current support I have been getting from Bluehost.)
I can’t alter it because it would alter everyone’s site
ROFL! That’s the most ridiculous assertion I’ve heard in a while!
The results of using this function are persistent so it only needs to be run once. It’s usually recommended to execute from a plugin activation or deactivation hook. This mainly applies to plugins distributed to others. To run custom code only once on your own site, there are a few options. I recommend requesting execution through /wp-admin/admin-post.php. Your code would be hooked into the "admin_post_{$action}" action hook where {$action} would be a value passed as an URL query string to initiate the code.
Since this code is no longer needed once it has been used, it can be added to your theme’s functions.php file. All the same, you might want to keep a backup copy of your code somewhere safe. When your theme updates, the code you added to functions.php will disappear.
Hello I have the same problem I installed wp sweep and every other plug-in I know but the problem persists I don’t know how and where to insert what code ?? Please can you be more specific? I don’t want to interrupt wp my admin php
Could this have to do with the latest WP update to 6.6.1?
I’ve never had this problem either but now I do (WP gives a performance warning even though my wp-options file is 922Kb)
I have the same problem. This issue is marked as solved. What did actually help? I quite cannot find a proper solution in the given answers…
What I did was:
*** Make a backup of your site AND your DataBase ***
1. Delete all the plugins that you don’t use.
Install a plugin called WP-Optimize; this lets you delete tables that are left behind by badly designed plugins.
Then I went to browse through MyPHPadmin. This gives you the opportunity to delete whatever you want to delete (be careful). E.g. I’ve never used Jetpack plugin. But still in the wp-options table there was residue of that plugin.
My wp-options autoload now is 980Kb. It came down from 2Mb+
Let me know if you’d like to know more
Hi @bcworkz,
Could you please tell me is this function wp_set_option_autoload_values() still works with WordPress after verison V6.5.5, bcs autoloaded options are using the new values for the autoload field (including on, auto-on & auto)? Or needs to be updated?
It needs to be updated, as I can understand from your question