After running the following query SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes';
I've found I got 1587 autoloading options values, mostly belonging to custom fields values; since they start with category
or _category
I am looking for a way to SELECT and UPDATE the autoload value for all at once. I guess an SQL query would be the fasted method but I am not sure about the correct syntax.
Add a comment
|
1 Answer
Not a hard task at the end. I've managed to do it in two chunks with
UPDATE wp_options SET autoload = 'no' WHERE option_name LIKE 'category%';
and
UPDATE wp_options SET autoload = 'no' WHERE option_name LIKE '_category%';
-
1
-
@MichaelRogers Yes sure, if you have plenty of autoloaded options which increase SQL data transfers - it might have a positive effect.– timCommented Nov 24, 2021 at 11:12