After building 8 Roots sites, here’s my experience installing premium Plugins via Composer:
Note: I am aware of the method of pulling from another separate WordPress installation. And things like Toran & Satis. But these seem like bandaids and don’t follow a decentralized approach.
- Download the Premium plugin from the authors website.
- Login to my Gitlab server.
- Create the repo.
- Mark it’s repository as a semi-private (called “Internal” in GitLab) repo because Composer chokes if it’s fully private.’
- Clone the empty repo to my local machine.
- mv the files into my repo.
- Push back to the repo.
- Navigate back to my site.
- Open my Composer file.
- Copy some code I use for adding Premium Plugins.
- Update it with my repo URL and vendor and Plugin name.
- Run composer.
- Activate.
Here’s an example composer file I have.
Additionally, if I want to update my Plugin I have to repeat steps 1 & 2.
And if I use the download link provided from many authors then Composer is either blocked by their server, or it expires, requiring the steps above.
I’ve consulted directly with the authors of many Plugins and found very few to be sympathetic and interested in providing Composer support, much less actually doing it. Delicious Brains and ACF being the select few.
When contrasting these steps to the standard WordPress Plugin system, I don’t see any benefit beyond being able to keep the Plugins in a config file and quickly rolling back. And both of these are features we could write custom code to introduce into WordPress if we wanted - without Composer.
So, it seems to me that while Composer is the right choice for dependency management in various Places of Bedrock and Sage it’s not the right choice for Plugins.
What do you guys think?