How To Disable Plugins From Specific Pages In WordPress
Plugins are individual packets of code that add on to your WordPress website and enhance its functionality. With that being said, you might have situations where plugins you need for one portion of your site conflict with another feature, or cause unwanted issues.
In that scenario, you’ll need to know how to strategically disable your plugins. Let’s talk about why that can be necessary and how it works!
How Plugins Impact the Speed of Your Site
Every plugin you use requires some amount of processing power, so using too many of them could cause your site to load slowly. That’s a problem, because site speed is crucial to maintaining a successful website. Almost half of users will abandon a page that takes more than three seconds to load.
Fortunately, there’s a way to reduce your page loading times without sacrificing the number of plugins you use. You can disable plugins from running on certain pages, so they’ll only load when necessary. This way, you can reap the benefits of using powerful WordPress plugins to increase your site’s functionality, while also optimizing your pages’ speed.
WordPress Plugin Organizer
The good news is that you can disable plugins from loading on certain pages by using Plugin Organizer:
This is a free, open-source plugin that comes with a wide range of features. It enables you to:
- Activate or deactivate plugins for certain URLs
- Activate or deactivate plugins for specific user roles
- Enable plugins on particular post types only
- Change the loading hierarchy for plugins
- Only load plugins when they are needed
It’s a best practice to remove any plugins that you’re not using from your site entirely. However, if there are some plugins that you need only for specific tasks, you can use Plugin Organizer to ensure that they only load when needed. For example, if you use an affiliate plugin, you can choose to enable it only for logged-in members with an affiliate user role.
How to Use WordPress Plugin Organizer to Manage Active Plugins
The best thing about Plugin Organizer is that it’s easy to set up and start using. Let’s walk through how the process works, from start to finish.
Step 1: Back Up Your Site
Plugin Organizer is a powerful tool, which can change how plugins interact with your website. This has the potential to break parts of your site if you’re not careful. Therefore, we recommend performing a full backup of your site before using this plugin.
Fortunately, if you’re a WP Engine Customer, you’ll have access to backups of your website whenever you need them. This is because we provide automatic daily backups on all of our WordPress hosting plans.
If you need to perform a backup of your website in another way, you can do that as well. You’ll have several options to choose from, as you can do a manual backup using a File Transfer Protocol (FTP) application or through your cPanel (if your hosting provider offers that feature).
Step 2: Download the Plugin Organizer
Once your backup is in place, you’re ready to install Plugin Organizer. You can do this through WordPress by visiting Plugins > Add New in your admin dashboard, searching for the plugin, and selecting Install Now:
When that’s finished, hit Activate. Then the plugin will be ready to go.
Step 3: Configure the Plugin Organizer Settings
After setting up the plugin, navigate to Plugin Organizer > Settings. This opens up the settings menu, where you’ll be able to configure some key options for your site:
You’ll want to go through the choices under General Settings, and configure them to match your specific needs. Let’s look at what each of these options does:
- Fuzzy URL Matching. When this setting is on, plugins will load on child pages on your site.
- Ignore URL Protocol. It’s recommended to keep this function turned off. It tells the plugin to ignore the HTTP/HTTPS redirect if you have one.
- Ignore URL Arguments. This instructs the plugin to ignore URLs with parameters, which refers to everything in a URL that comes after a question mark. You should keep this off unless you have a specific reason to turn it on.
- Only allow network admins to change plugin load order? If you are using a multisite WordPress network, this setting would require a network admin account to change the plugin load order. It’s recommended that you keep this setting on if you use multisite, but if not you can leave it off.
- Custom Post Type Support. If you have any custom post types, add them here to enable Plugin Organizer on those pages.
- Auto Trailing Slash. This option removes the trailing slash on plugin-related URLs, and formats them according to your site’s WordPress permalink settings.
- Selective Plugin Loading. This setting enables you to load some plugins only on certain pages, even while they’re deactivated in your plugin settings. We’ll explain how to do this in a later step.
- Selective Mobile Plugin Loading. Similarly, this option will enable you to disable certain plugins on mobile devices.
- Selective Admin Plugin Loading. This option lets you enable some plugins to load only in your site’s admin dashboard.
- Disable Plugins By Role. This lets you disable plugins for certain user roles. You can select the affected user roles in the Role Support box.
When you’re done tweaking these settings, don’t forget to save your changes to the page. Then you can move on to the next task.
Step 4: Create a Must-Use (MU) Plugin
Next, you’ll want to check and see if Plugin Organizer’s Must-Use (MU) plugin was installed correctly. The plugin should have created this file by default upon installation, but it fails to do so on occasion.
You can visit Plugins > Installed Plugins to see whether the installation process successfully added an MU plugin:
If it did, you should have a new tab of plugins labeled Must-Use, which includes an item called Plugin Organizer MU. If not, you will need to add one yourself. You’ll need to access your site using a File Transfer Protocol (FTP) client, download the PluginOrganizerMU.class.php file from /wp-content/plugins/plugin_organizer/lib, and then upload it to /wp-content/mu-plugins/.
Step 5: Configure the Global Plugin Settings
Next, you can visit Plugin Organizer > Global Plugins to choose your ‘global plugins’. These are plugins that are activated on your site, but disabled from loading on the user’s end:
For example, if you use a backup plugin like UpdraftPlus, you may not need it to load for your visitors. Drag any plugins that you want to disable by default into the Disabled Standard – All Users column, and save your changes.
Step 6: Disable Plugins for Custom Post Types
To choose which plugins will be disabled only for specific custom post types, you can go to Plugin Organizer > Post Type Plugins:
You can select the post type you’d like to edit from the drop-down menu here. Then, drag any plugins you’d like to disable for that post type into the column on the right. You can choose to disable a certain plugin for logged-in users, logged-out users, or both.
Step 7: Change Your Plugins’ Load Order
Finally, you can customize your plugins’ load order by visiting Plugin Organizer > Group and Order Plugins:
This page gives you control over what order your plugins load in. WordPress normally loads plugins in alphabetical order, but that isn’t necessarily the optimal method.
Ideally, plugins should load based on their hierarchy. For example, if you have a WooCommerce extension, it should load after the main WooCommerce plugin, as it will need to reference WooCommerce files in order to function.
You can also group plugins together, so that they load at the same time. To do that, first choose Create New Group from the drop-down menu at the top of the page, and enter a name for your group.
For instance, you may want to group together a plugin and its extensions. Select any plugins you want to add to the group, and hit Submit. Then, you can continue to customize your plugin load order as needed.
Plugin Organizer Alternatives
If Plugin Organizer is not what you’re looking for, there are some alternative tools you can try. Not all of them have the same features, so the following options should give you a good variety to choose from.
Files can be ‘minified’ and preloaded, for example. This helps to lighten your website and keeps it loading faster. Additionally, it can make it easier to eliminate potential conflicts between specific plugins and themes. While the free, ‘lite’ version of the plugin enables you to do quite a bit, the Pro version offers features that open the door for a more customized approach to your plugin management.
Plugin Load Filter is free, and has a very straightforward interface. This tool helps you manage where your plugins have permission to function and how they integrate with your content.
The included features support a number of different kinds of posts and pages, including custom post types and Jetpack modules. You’ll be able to see a list of all your plugins in a matrix, along with your site’s content types. You can then check boxes to disable each plugin as needed.
Even as a free solution, you’ll get all the features you need with Plugin Load Filter. Just keep in mind that support may be limited.
Improve Your Site’s Speed With WP Engine
Every extra plugin you use can slow down your WordPress site. However, managing your WordPress plugins carefully can help your site run faster, without sacrificing functionality. You can do that by ensuring that plugins only load when they are needed, using the free Plugin Organizer.
Here at WP Engine, we offer the best resources for developers and can help you create an incredible digital experience for your customers. Plus, WP Engine’s fast WordPress hosting solution is specifically optimized for WordPress, to enable faster loading times. You can also use our Speed Test tool for insights and suggestions about how to make your site even faster!