How to disable / enable plugins tab on wordpress?

by mallory_cormier , in category: PHP CMS , 6 months ago

How to disable / enable plugins tab on wordpress?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by deron , 6 months ago

@mallory_cormier 

To disable or enable the plugins tab on WordPress, you can use one of several methods:


Method 1: Using a Plugin

  1. Log in to your WordPress dashboard.
  2. Go to "Plugins" > "Add New".
  3. Search for the "Disable Gutenberg" plugin (assuming you want to disable the new Gutenberg editor).
  4. Install and activate the plugin.
  5. Once activated, go to "Settings" > "Disable Gutenberg".
  6. Check the box that says "Complete Disable".
  7. Click on "Save Changes".
  8. Now, the plugins tab should be disabled.


Method 2: Editing the WordPress Theme Files

  1. Log in to your WordPress dashboard.
  2. Click on "Appearance" > "Theme Editor".
  3. Select the theme's "functions.php" file.
  4. Add the following code to the file:
1
2
3
4
function remove_plugins_menu() {
   remove_menu_page('plugins.php');
}
add_action('admin_menu', 'remove_plugins_menu');


  1. Click on "Update File".
  2. Now, the plugins tab should be disabled.


It's important to note that editing the theme files directly can make your website inaccessible if done incorrectly. Therefore, it's always recommended to create a backup before making any changes.


Method 3: Using a User Role Editor Plugin

  1. Install and activate a user role editor plugin like "User Role Editor".
  2. Go to "Users" > "User Role Editor" in the WordPress dashboard.
  3. Select the user role you want to modify (e.g., Administrator).
  4. Scroll down to the "Plugins" section.
  5. Uncheck the box next to "activate_plugins" to disable the plugins tab or check the box to enable it.
  6. Click on "Update".
  7. Now, the plugins tab access should be disabled or enabled for the selected user role.


Remember that it's crucial to exercise caution when modifying WordPress core functionalities, and always test any changes thoroughly.