1

I am trying to improve the performance of a wordpress based blog. I am looking at wp_options table and am thinking to set the column auto_load to 'no'.

Does it have any side-effect on the site itself ? Does it improve the performance of the site ?

1 Answer 1

0

It depends on content and context.

Options with autoload = yes are loaded very early, all in one query. This is pretty fast, but it might be too early when an options contains a serialized object whose class isn’t loaded yet.

Options with autoload = no are loaded when get_option() is called.

Use yes when …

  • ( you need the option on (almost) every page load or
  • you don’t know when you will need the option or
  • the option value is very small ) and
  • the value is not a serialized object

Use no in all other cases, or refactor the code to make it “yes-compatible”.

You have to weight the number of database requests against the size of the transferred content. When in doubt, measure both.

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.