I wrote this script based on the wp core is-installed check. It should be simple and straightforward but it does not work, and I can’t figure out why. At first I believed the is-installed check just might not work with WP-CLI, but honestly I don’t even know enough to know where to start debugging this.
You’re right I’m dumb. I forgot I can use composer and then just keep it active on remote install. Now the only thing left is that I need to run wp lcache enable if it’s activated.
You can add this wp cli command to the site specific deploy yml.
The plugins are activated when transferring the database + uploads/ to WordPress site (because it also contains the configuration for plugin status).
It is also possible to run wp plugin activate lcache before wp lcache enable, in the right hook after which the plugins were installed by composer.
I currently have it in the site specific build-after, but I’m thinking the plugin activation detection is not working correctly so these commands don’t run.