unfortunaltely I noticed that everytime that I deploy to the staging, the plugin is not there, if i check the wp-admin, i can see this message “The plugin password-protected/password-protected.php has been deactivated due to an error: Plugin file does not exist.”
if I run composer update on the staging, I can see the plugin in the admin area, but i need active it and re-configure the settings.
my default deploy-hooks seems ok, I followed what I usually do with the trellis/bedrock projects, I always use the “Password Protected” plugin to protect my staging website, but I don’t know why this time I have this problem.
but it seems that every time that I deploy, it remove the plugins installed on my staging, so I need to re-run composer update on staging, but then I need to active and re-set up the plugin settings.
I am pretty sure that I am missing a step, do you have any idea?
thanks
When you use composer packages there’s two files composer reads composer.json and composer.lock.
A composer.lock file stores exact versions of dependancies. This is always read first by a composer install command - which is the same command executed on a deploy to staging / production.
When you run a composer update it reads from the composer.json and generates a new composer.lock file.
The .lock file acts as a screenshot of dependancies, allowing your environments to have a consistent dependancy list. Or allowing everyone using this codebase to have matching dependancies.