heroku-wp icon indicating copy to clipboard operation
heroku-wp copied to clipboard

Doc Needed: Add must-use plugin using Composer

Open Tailzip opened this issue 8 years ago • 3 comments

Hi,

How can I add a must-use plugin using Composer?

Thanks!

Tailzip avatar Feb 23 '17 17:02 Tailzip

Take a look at one of the MU plugins that comes with this repo already, secure-db-connection. You will first need to install the plugin via Composer's require:

https://github.com/xyu/heroku-wp/blob/cfe7105/composer.json#L22

Then add that plugin to the MU plugin custom installer path:

https://github.com/xyu/heroku-wp/blob/cfe7105/composer.json#L66

xyu avatar Feb 24 '17 08:02 xyu

I finally manage to add one (S3 Uploads). After you add the plugin to the MU plugin custom installer path in your composer.json file, you also need to create a symlink in public/wp-content/mu-plugins that points to plugin's main file.

In my case, I ran this command inside public/wp-content/mu-plugins: ln -s s3-uploads/s3-uploads.php s3-uploads.php.

It would be nice to add a small paragraph in the README :)

Tailzip avatar Mar 01 '17 10:03 Tailzip

@Tailzip good point I forgot about the symlink part of that process going to reopen this issue to get that fixed. 🙂

xyu avatar Mar 02 '17 06:03 xyu