Plugins not available on deployed site

Hi Guys,

Just wanted to share a solution for a problem that was driving me crazy. I developed a site on a local Vagrant box using Bedrock with Sage9. After deployment however I wanted to update all tables with the new url of the live site. I find better search replace most convenient for this so I installed it via wpackagist, pushed to production and ran composer install on the live server. The plugin was visible in the installed plugin list and could be activated.

However, the menu item for the plugin did not show up in the tools section. On my local VM the menu item did appear. After a few hours I wanted to debug what was happening in production, so I switched to development in my .env file. After this the plugin menu was visible again.

This is actually a really useful feature as it prevents ‘advanced’ plugins that can cause serious harm to be operated by clients with admin privileges. Nice to discover new awesome things about Bedrock/Sage every day :slight_smile:

I’d be cautious relying on this as functionality on a production site. This appears to be a bug related to the particulars of your environment and deployment, and definitely isn’t a planned feature of Bedrock.

But I’m glad you got it working!

For the future, give Trellis a try. Its intent is to create identical development and production environments to avoid exactly this kind of weirdness between deployments!

2 Likes

Thanks for letting me know. In this case, I had to deploy on a shared hosting so not enough privileges to use Trellis. But I will save that for the next project on a (managed) VPS.