最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

performance - Do deactivated plugins slow down a WordPress site?

matteradmin9PV0评论

Most people are aware that minimizing the number of plugins used is a good way to help keep a WordPress site running fast. However, does that general rule include deactivated plugins?

Most people are aware that minimizing the number of plugins used is a good way to help keep a WordPress site running fast. However, does that general rule include deactivated plugins?

Share Improve this question asked Aug 12, 2010 at 15:34 Travis NorthcuttTravis Northcutt 3,4005 gold badges43 silver badges60 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 57

No it doesn't. At least, not on the front end, or in the back end in any non-plugin area. WordPress only loads files whose filepaths are stored in the active_plugins option in the database and ignores everything else completely.

Except in unusual cases having deactivated plugins only affects the performance of the plugin page in the admin, and only then a trivial amount (unless you have hundreds of plugins.) During the plugin admin page load WordPress scans all the plugins and then stores the list of active plugins in the database. Then on all other page loads WordPress inspects that list of plugins, not the plugins themselves.

The one caveat to this is if the deactivated plugin stored a lot of autoload data in the wp_options table and deactivating doesn't remove that data because doing so could cause a user to loose configuration options when they deactivate which they may want to do only for a few minutes which is a common approach taken when someone is debugging a problem with a site. However, if you are using a plugin that add so many options during autoload that it causes a problem them it's not a great plugin anyway.

If you do run into such a plugin and need to get rid of the options then this might help.

Apparently, it turns out, installed but deactivated plugins can indeed increase load time. Just installed W3 Total Cache without activating it. Turns out, just by having it installed, page generation time of the dashboard increased by 0.05 seconds. From 0.15 seconds to 0.20. Repeatedly, on over 20 pageloads. Uninstalled it. Dashboard loads in 0.15 seconds again. Repeatedly, on over 20 pageloads. Page generation time measured by plugin "Query Monitor".

There you have it. The above answers are therefore incorrect.

(I would be very happy to be enlightened why this happens, with this specific plugin.)

Post a comment

comment list (0)

  1. No comments so far