Permission issues with fresh Trellis/Bedrock installation

Hello,

I’m new to Trellis and spent the last 2 days learning how to use it. I was finally able to deploy to Digital Ocean but there seems to be a permissions issue as I cannot install plugins. In WP-Admin, the New Plugin menu doesn’t even show up, and trying to install with wp plugin install returns this error

Warning: Could not create directory.

My Trellis installation is pretty much using default settings. I did set sshd_permit_root_login: false for added security.

What are some steps I can take to possibly fix this?

Update: Uploading media in the Media Library works.

You don’t install plugins using the WordPress interface. Add any desired plugins to your Bedrock composer.json file, commit and push to your remote git server and then re-deploy the site.

A quick and simple way to add a plugin would be to do this in your Bedrock directory:

composer require wpackagist-plugin/<plugin-slug>

Ok thanks. Is there documentation about this and how to install other non-WordPress plugins (paid plugins, custom plugins, etc)

The Bedrock Docs themselves are a good place to start:

There are a few discussions on here regarding custom/commercial plugins. Here’s one:

Thanks for these docs. I was able to get my plugins running in the development environment but when I deploy to staging, they dont get included.

I ran composer update in the sites/directory. Is there anything else I should be doing?

I’m guessing you still need to commit your updated composer files to the repo that is cloned during deploy, like Downgrade WP when deploy. Then the deploy will run composer install automatically.

Right. I had not realised that deployment meant that the source repo would be cloned.

I cloned the repo and updated the repo key in wordpress_sites.yml for both staging and production, and committed my changes to github. However, on deployment, plugins still don’t get included.

Here is my repo: https://github.com/epicenterbitcoin/epicenter.tv

Update: I noticed that several tasks are being skipped during deployment

TASK: [Ensure environment is defined]
skipping: [localhost]

TASK: [deploy | Update git remote URL]
skipping: [-domain redacted-]

TASK: [deploy | Check for project repo subtree]
skipping: [-domain redacted-]

TASK: [deploy | Fail if repo_subtree_path is set incorrectly]
skipping: [-domain redacted-]

TASK: [deploy | Run git archive with subdirectory to populate new build dir]
skipping: [-domain redacted- ]

TASK: [deploy | Fail if composer.json not found]
skipping: [-domain redacted-]

TASK: [deploy | Warn about updating network database.]
skipping: [-domain redacted-]

TASK: [deploy | Update WP network database]
skipping: [-domain redacted-]

TASK: [deploy | Restart HHVM]
skipping: [-domain redacted-]

Resolved.

I wasn’t running composer update before committing my changes to github.

1 Like