People often complain that WordPress is being slow and that’s true if you use lots of plugins, badly written code that doesn’t follow WordPress coding standards (it’s incredible how many people claim themselves to be WordPress developers without even following the basic coding standards in developing themes and plugins), no caching plugins to boost the speed of your website and no enqueue/dequeue of scripts and style based on the page loaded. The list can go on and on about website loading speed.

Today, I’d like to share with you a way to make your pages load faster without doing any coding, which is great for both beginners and advanced developers as it’s often convenient to apply things in the Dashboard rather then updating the code.

A plugin I’ve been using it for a while is Plugin Organizer. Constantly updated and having over 10,000 active installs this plugin allows you to selectively disable plugins on a post/page and setup the order in which the plugins are loaded/initiated on the page. This is ideal for large websites.

Being able to disable specific plugins on pages/posts has a number of advantages including:

  • Make sure a plugin loads only on the pages you need. This way, the other pages will be lighter, load faster and if you ever have problems with a plugin only those few selected pages will be affected. Think about the well know plugin Contact Form 7. Most of the people used it on their “Contact” page and loading it on other pages without using it is not desirable. So, less back-end and front-end processing!
  • WordPress Plugin Loading Order: as a developer, you sometimes need to order the way in which the active plugins are loading, as each plugin has its back-end and front-end code that triggers. For instance, if a plugin depends on another to function, then this feature will be very useful.

Here’s a list with the most common plugins that I’ve been disabled on specific pages on WordPress websites:

  • Contact Form 7 (only on the Contact page)
  • Lightbox Evolution (if the pages has images or content that need to load in a modal box)
  • NextGen Gallery (used only if I’m on a page with an image gallery)
  • SyntaxHighlighter Evolved (use only on pages with code snippets)
  • Yet Another Related Posts Plugin (on pages of ‘page’ type, front-page, archive pages – pages that are not posts in general)
  • Easy Digital Downloads, WooCommerce (on pages where there are no products shown and the shopping cart is not displayed)
  • The list can go on and on. Think about the premium plugins (complex sliders, advanced contact forms) that are sold through Codecanyon and you will only use in a few pages.

    There are exceptions though as some plugins do require to be active in most/all pages even though you have the feeling that they are used in a few pages only. They can run processes in the background on other pages as well so you need to keep them active if you want to enjoy all the plugin’s benefits. For this, you just need to understand how the plugin works and read its documentation.
    1. Go to Plugins – Add New and search for “Plugin Organizer”. Install and Activate it!
    2. Enabling Selective Plugin Loading: you must move the /wp-content/plugins/plugin-organizer/lib/PluginOrganizerMU.class.php file to /wp-content/mu-plugins or wherever your mu-plugins folder is located. If the mu-plugins directory does not exist you can create it. The plugin will attempt to create this directory and move the file itself when activated. Depending on your file permissions it may not be successful so you have to check it out once the plugin is active.

    To disable a plugin site-wide, just go to “Plugin Organizer” -> “Global plugins” and select the plugin you’d like to have disabled.

    plugin organizer disable site wide

    As you need to use the plugin in specific pages, go to edit that page and look for “Plugin Organizer” meta box. Set the plugin to “On” and it will only be triggered on that specific page.

    If you know you have a plugin that will be used for future posts/pages, then the other option would work in this case. You can leave the plugin active side-wide and just go and mark it as “Off” on the pages where you do not need it.

    plugin organizer in edit page

    The plugin comes with custom post type support as well so it will work if you access other type of pages, besides the regular posts and pages (e.g. the download page from Easy Digital Downloads, the product page from WooCommerce etc.).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.