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.


1 Answer 1


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
    Hi i wonder is there any benefit on this? Commented Mar 3, 2018 at 18:10
  • @MichaelRogers Yes sure, if you have plenty of autoloaded options which increase SQL data transfers - it might have a positive effect.
    – tim
    Commented Nov 24, 2021 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.