PERFORMANCE WARNING

WP Intense Q & ACategory: Scalability ProPERFORMANCE WARNING
sebbe888 asked 4 years ago

Hello,

We at Roomly.se are very statisfied with your plugin. Really good job. 🙂

Was looking into the plugin on our site and found this:

" You have 16034 options set to autoload. This is too many and will be slowing down your site significantly. Contact us through our Q & A section for assistance in fixing this and we’ll deploy a fix specific to your situation."

Is there any way you could help us with this?

Best regards,

Sebastian

Roomly.se

1 Answers
Dave Hilditch answered 4 years ago

Hi – so – if you see this warning, you are getting a really big slow down on every page of your website. Here’s how to identify the issue and fix it:

Firstly – you need to be able to run a SQL query – in the next version of the WPI Perf plugin I’ll figure out a nice easy way to semi-automate this.

In the meantime, if you install the SQL Executioner plugin, you can use that to do the job. Install it and run the following query:

select option_name from wp_options where autoload = ‘yes’;

Scan down through the results and comment here – there will be a large variety, but you will find that one or two prefixes jump out – ie. you will see a similar option name 1000s of times.

I’ve found 2 so far: wpseo… and ewww… which do not need to be autoload. If you can report back, I’ll get fixes for all these added to the perf plugin to speed up other people’s sites.

In any case, here’s the SQL command I’ve been using to fix these (no harm done for ewww or wpseo – let me know which ones you have to be sure before you run this):

update wp_options set autload = ‘wpi’ where autoload = ‘yes’ and option_name like ‘ewww%’;

(replace ewww% with whateverprefix% is common to the 1000s of similar options filling your autoloaded options table).

Bit of background – lazy developers have added options to their plugins without setting autoload to no. WordPress, on every page, loads all options into an array which are set to autoload. If they are not needed, this is wasteful. On the other hand, it helps speed up calls to these as plugins which DO use them already find them loaded. Anyway – most of the time it’s laziness or they didn’t realise when saving their options that this might happen and cause a performance problem.

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.