Does auto_load to ‘no’ in wp_options improve performance

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 ?

Related posts

1 comment

  1. 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.

Comments are closed.