Plugin Updater Role
Wordpress plugin that enables the creation of a new role that only have access to the wp-plugins section and limits access by IP.
by Franky Melero · github.com/frankymelero/wp-plugin-updater-role · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/frankymelero/wp-plugin-updater-role/archive/refs/heads/main.zipPlugin Updater Role Plugin
Description
The Plugin Updater Role Plugin adds a custom user role named Plugin Updater to your WordPress site. This role is designed to allow browser automation scripts to view and manage plugins but restricts access to plugin activation, deactivation, and installation. Additionally, the plugin supports IP-based restrictions to limit access to specific IP addresses for users with this role.
Features
- Custom User Role: Creates a user role named
Plugin Updater. - Restricted Access: Limits user access to only the Plugins list and Update Core pages.
- IP Restriction: Optionally restricts login access to users with the
Plugin Updaterrole based on their IP address. - Hide Actions: Removes activation and deactivation links from the plugins list for the
Plugin Updaterrole. - Block Direct Actions: Prevents plugin activation and deactivation through direct URL actions.
- Settings Page: Adds a settings page for configuring IP restrictions.
Installation
- Download the Plugin: Download the plugin ZIP file from the GitHub repository.
- Install via WordPress Admin:
- Log in to your WordPress admin dashboard.
- Go to
Plugins>Add New. - Click on
Upload Pluginand select the downloaded ZIP file. - Click
Install Nowand then activate the plugin.
Configuration
-
Configure IP Restrictions (Recommended):
- Navigate to
Plugins>Plugin Updater Role Settingsto configure IP restrictions. - Enable IP restriction and enter the allowed IP address.
- Navigate to
-
Assign the Plugin Updater Role:
- Go to
Usersin the WordPress admin dashboard. - Edit or create a user and assign the
Plugin Updaterrole.
- Go to
Usage
-
Role Capabilities: Users with the
Plugin Updaterrole can access:- Plugins list (
plugins.php) - Update Core (
update-core.php) - Plugin Updates (
update.php)
They cannot:
- Activate or deactivate plugins.
- Install or delete plugins.
- Plugins list (
-
IP Restriction: Users with the
Plugin Updaterrole will need to log in from an allowed IP address if IP restriction is enabled.
Frequently Asked Questions (FAQ)
How do I add multiple IP addresses for restriction?
Currently, the plugin only supports a single IP address for restriction.
What happens if a Plugin Updater user tries to access restricted pages?
Users will be redirected to the Plugins list page.
Can I customize the role's capabilities?
The plugin provides predefined capabilities for the Plugin Updater role. For further customizations, you may need to use additional plugins or custom code.
Support
For support or questions, feel free to send me a message through Linkedin.
Changelog
0.2 - Added IP restriction feature and settings page.
0.1 - Initial release with basic role and access restrictions.