You do not have sufficient permissions to access this page

Hi @swalkinshaw and everyone in this community, I followed up your great Capistrano screencast and managed to upload my site to my AWS EC2 instance.

I also manage to do it with a Multisite installation.

However, there’s something going wrong that it’s concerning me. After doing the deployment and uploading the DB via wp_cli as suggested, everything works fine on the production site except that I’m not able neither to install plugins or themes. I’m logged as the admin user.

When navigating over the admin panel, If I pass the mouse over the plugins menu I don’t have the chance to add any new plugin. Also if I try to do it manually via /wp/wp-admin/plugin-install.php I get the following error: “You do not have sufficient permissions to access this page.”

Is this an error or It’s intended for only managing plugins via composer?? When working locally, everything works as expected. Over the production site, there are kind of permissions errors.

Thanks in advance for your advance and keep doing this great work. I look forward for your next Ansible screencast on this excellent framework.

Please let me know if you need any extra info.

There’s only two settings to do with updates/modifications disabled by default in Bedrock:

AUTOMATIC_UPDATER_DISABLED and DISALLOW_FILE_EDIT

Neither of those should show the error you get. I always keep those default settings and I’ve never seen that error. (in fact I just tried again and it’s fine).

You can try changing those but I highly doubt it has to do with them. It sounds more like a user permissions problem.

My only thought is that this happens because of the DB import. If you’re able to I might try resetting your production DB to see if the error happens on a stock WP install without the import.

What happened is correct - @40Q did not see the “Add a new Plugin” button if those settings are not there, IE. a stock WP install. Manually going to plugin-install.php resulted in “You do not have sufficient permissions” because of that.

@40Q this is actually a feature of Bedrock now, you cannot modify or install plugins and themes or edit any files on the production site. All updates should be done locally or at the very least on a staging server.

So, it’s no error :smile:

1 Like

:thumbsup: Thanks both very much for your answer.

I will consider this for future sites.

Keep doing this great job!

Sorry to keep bothering, @kalenjohnson . But is there any way to control this and disable it? As with new plugins the same is happening with some plugin options which would be great to control over wordpress admin. (i.e. Amazon S3 and Cloudfront).

Thank you!

Sure, remove this line: https://github.com/roots/bedrock/blob/master/config/environments/production.php#L14

2 Likes

@kalenjohnson is correct about the behaviour so sorry if I confused you.

Guys, you rock! Thank you. Have a good weekend.