Bedrock Plugin Installation Error
November 13, 2024 ยท AI Conversations
bedrock
Here are a few things you can check and try:
### 1. **Check Your User Role**
Ensure that the user account you're logged in with has **administrator** privileges:
– Go to your WordPress Dashboard.
– Navigate to **Users** > **All Users**.
– Check if your user role is set to **Administrator**.
If your user is not an Administrator, you won't have permission to install plugins.
### 2. **Verify `DISALLOW_FILE_MODS` Setting**
Bedrock's `config/application.php` file might have the constant `DISALLOW_FILE_MODS` set to `true`, which prevents any file modifications, including plugin installations.
– Open the `config/application.php` file.
– Look for the following line:
define('DISALLOW_FILE_MODS', true);
– If it's set to `true`, change it to `false`:
define('DISALLOW_FILE_MODS', false);
– Save the changes and clear your cache.
### 3. **Check the `WP_ENV` Setting**
Bedrock uses different environment settings. Make sure your environment is not set to `production`, as this can prevent plugin installations.
– In your `.env` file, check the `WP_ENV` setting:
WP_ENV=development
Ensure it is set to `development` or `staging` if you're working in a local or test environment.
### 4. **Check File Permissions**
Ensure that your web server has the correct permissions to modify files:
– SSH into your server and navigate to your WordPress directory.
– Run the following commands to set proper permissions:
sudo chown -R www-data:www-data /path/to/your/wordpress
sudo find /path/to/your/wordpress -type d -exec chmod 755 {} ;
sudo find /path/to/your/wordpress -type f -exec chmod 644 {} ;
Make sure to replace `/path/to/your/wordpress` with your actual path.
### 5. **Check `Bedrock` Capabilities Configuration**
Bedrock sometimes restricts plugin installations via custom settings. Make sure there are no additional custom configurations in `config/application.php` that restrict capabilities.
### 6. **Check Multisite Configuration (if applicable)**
If you're running WordPress in a **Multisite** setup, only the **Network Admin** can install plugins:
– Navigate to **My Sites** > **Network Admin** > **Dashboard**.
– Try installing the plugin from there.
### 7. **Disable Any Security Plugins**
Some security plugins can restrict plugin installations. Temporarily disable any security plugins to see if that resolves the issue.
### 8. **Clear Caches**
If you're using caching (like Redis, Varnish, or WP Rocket), make sure to clear your caches after making the above changes.
These steps should help you resolve the error and allow you to install plugins on your Bedrock-based WordPress site.