WordPress

2 Ways to Stop Users from Deactivating WordPress Plugins

Wordpress plugin monir khan

Do you want to stop customers from mistakenly disabling WordPress plugins on their websites?

If you build websites for other people’s businesses, you probably already have a preferred toolkit of essential WordPress plugins installed on all of your customers’ websites. You can also insert client-specific code snippets into site-specific plugins for that customer.

However, customers risk inadvertently deactivating one of those plugins, which might negatively impact the functioning of their site or even entirely damage it.

To minimize your user’s power over your site, this post shows how to securely prevent them from deactivating WordPress plugins.

We will discuss two approaches, and you are free to choose the one that best suits your needs. Along the way, we’ll also discuss other ways to address the problem.

Let’s begin with the path of least resistance.

Technique 1. Utilize a Plugin to Prevent WordPress Plugin Deactivation

This approach is more straightforward and causes less disruption than others. In addition, it grants unlimited power to all users with the administrator position, so they may disable it anytime they choose.

To put it simply, we will use a plugin that removes the link to “Deactivate” from all other plugins. Users would still be allowed to install new plugins, but they would do so at their own risk, and they may stop this protection at any moment.

Installing and activating the Disable Plugin Deactivation plugin is the very first item on your list of things to accomplish. Check out our comprehensive walkthrough of installing a WordPress plugin for additional information and specifics.

Once the plugin has been excited, you will need to visit the Plugins » Plugin Deactivation Settings page to adjust the plugin’s settings.

To disable the ‘Deactivate’ link for all plugins, you must pick the ‘Enable’ button next to the ‘Disable Plugin Deactivation’ option.

You also have the option of disabling the activation of plugins, which would prevent users from activating any additional plugins. You also can disable the deletion of plugins and stop users from downloading and installing plugin updates.

Technique 2. Prevent Certain Plugins from Being Deactivated

Using this approach, you can prevent the deactivation of a single plugin or a collection of specific plugins installed on a website.

It will be necessary for you to insert code into your WordPress website. You are getting started with code snippets in WordPress if you are interested in learning more about how to do so.

To begin, you will necessity to locate the locations of any plugins that you want to deactivate. On your website, the wp-content folder is where WordPress plugins are kept.

Using an FTP program to connect to your WordPress hosting account gives you access to this folder, which you may browse. If you go within the plugins folder, you will see a separate folder for each plugin installed on that website.

You will also find a file for each plugin within each folder. These files are often titled after the plugin and have the extension.php appended to their names.

  • The plugins have been added, and their locations inside the plugins folder have been mentioned as part of the addition process. wpforms/wpforms.php is one example of this.
  • Make sure you don’t forget to change any plugin locations with the plugins you wish to safeguard.

You can go to the plugins page, where you will see that the deactivate link has been removed from underneath the plugins in question.

This strategy is superior since it just modifies the most essential plugins. Your customers will still be able to update all plugins, deactivate other plugins, uninstall plugins, and install new plugins.

Access to Plugins Can Be Restricted Based on User Roles and Permissions

A built-in user role management mechanism is included with WordPress by default. The following user roles are included in the typical WordPress installation by default:

  • Administrator
  • Editor
  • Author
  • Contributor
  • Subscriber

Check out our comprehensive introduction to the user roles and permissions of WordPress if you’re interested in learning more.

The permission to manage plugins is exclusive to the Administrator user position in the system. If you are developing a website for a customer, you can create two user accounts just for that client.

One with Administrator credentials will allow them to maintain the website independently without assistance. After that, you’ll have the option to create a second user account with the Editor user role. Your customers will be able to utilize it to generate content.

Because of this, the likelihood of them inadvertently deactivating essential plugins will be reduced. To successfully install updates and add new users, they must be instructed to utilize the Administrator account responsibly.

You also have the choice of building a bespoke user role for yourself, complete with its unique permissions. You will be able to make a user role that can edit themes but has no control over plugins using this method.

We hope this post helped teach you how to stop customers from deactivating plugins in WordPress. You may also be concerned about checking out our advice on how to create a personalized login page for WordPress users who are your customers.

Related Posts

Creating a Tabbed Settings Page in a WordPress Plugin Using WPPB 10 Essential WordPress Plugins for WordPressers: A Guide to Optimizing Your Website Installing a WordPress Plugin: A Step-by-Step Guide for Newbies How to Create a Custom Contact Form in WordPress What is the best way to delete all products in WooCommerce? How to fix WordPress There has been a critical error on this website The Best Places to Get Royalty-Free Images for Your WordPress Blog Articles  How To Prevent WordPress Blog Content Scraping For Beginners  How To Plan Your WordPress Posts  How To Place Captions On Images In WordPress  WordPress Blog Email Newsletters: What, Why, and How  Are you new to WordPress and curious about managed WordPress hosting?  What You Can Do To Participate In The WordPress Project  What Is A Web Blog, And How Does It Differ From A Website?  What Effect Do Your Web Host’s PHP Updates Have on WordPress Sites?  What Are The Restrictions Of The WordPress. Com Platform?  The Best Places to Get Royalty-Free Images for Your WordPress Blog Articles  Step-by-Step Guide for Installing and Configuring WP Super Cache for New Users  Do you want your WordPress content to have images next to each other?  How to Select the Ideal Color Scheme for Your WordPress Website  How To Pick The Perfect Domain Name  How to Repair the WordPress Error Establishing a Database Connection  How To Fix Typical Image Problems In WordPress  How to Enlarge Images Without Compromising Quality  How to Download and Install Plugins and Themes for WordPress from GitHub  How to Delete Numbers from URLs Created with WordPress  The Step-By-Step Guide To Uploading PDF Files To Your WordPress Website Want to know how to remove digits from WordPress blog posts and URLs?  The Step-by-Step Guide to Linking to an Email Address in WordPress How Does Changing Your WordPress Theme Affect Things?  Getting Started With WordPress Comment Moderation: A Beginner’s Guide  How to Generate Branded Short URLs for Your WordPress Blog: A Step-by-Step Guide WordPress Categories Vs. Tags: How To Sort Your Content For SEO Step-by-Step Guide for New WordPress Users on How to Correctly Uninstall Plugins in WordPress WordPress Theme Framework: What Is It? All That Is Good, All That Is Bad  Images Theft: 4 Approaches to Protect Them in WordPress 7 Crucial Tips for Using WordPress Shortcodes How to Use File Transfer Protocol (FTP) to Upload Files to WordPress for Newbies 5 Easy Ways to Use WordPress to Get More Facebook Likes  How To Setup A WordPress Theme For Beginners How To Get Free WordPress Training In A Week How To Detect and Stop a DDoS Attack Against WordPress How To Install A WordPress Plugin: A Step-By-Step Guide For Newbies How to Delete All of Your Past DNS Records (Chrome, Mac, Windows) How to Create a Site-Specific WordPress Plugin How to Copyright And Trademark Your Blog Name and Logo How To Conduct An Appropriate Website Speed Test (8 Best Tools) To-Do List: 7 Items Before Going Public Your WordPress Site Fixing A Hacked WordPress Website: A Guide For Complete Beginners Tips For Deleting And Removing A WordPress Theme (Step By Step) How to Merge Two WordPress Websites Without Sacrificing Search Engine Optimization Comparing WordPress.Com With WordPress.Org: Which One Is Better? WordPress and GDPR Compliance: The Complete Guide – Everything You Need to Know Which One Is Better: A WordPress Plugin Or A Functions.php File? The Top 10 WordPress Bugs And How To Fix Them How To Making A Website Logo: Step-By-Step Instructions  11 Essential Pages Every WordPress Site Must Have In 2022 WordPress’s 15 Most Frustrating Issues and How to Fix Them WordPress vs. HTML Site- Which Website Design Is Best for Your Business? WordPress Users: 10 Email Marketing Mistakes to Avoid 5 Essential WordPress SEO Audit Checklist Items To Improve Your Rankings How to delete all the WooCommerce products with SQL Query? Pagination in WooCommerce: how to set it up? How to Add WooCommerce Product Categories to the Menu What’s the difference between WordPress.com and WordPress.org? How to apply WooCommerce Shortcodes to theme development How to skip the FTP credentials to install the theme and plugin on AWS EC2