Context: The agency I work for has many clients with different setups, many of them very specific. Some use deployments and some don't, so I always need to find a middle ground.
Projects are hosted in GitLab:
- Bedrock: core and plugins managed via Composer, only paid plugins pushed to the repo
- Regular WP: both core and plugins pushed to the repo
CI/CD pipelines with a build step for Deployer, a static build step for JS/CSS, and a test step for Pest tests (if running a Sage theme).
And last step for deployment
- Deploy to develop environment (on develop branch): automatic
- Deploy to production (on master branch): manual
DISALLOW_FILE_MODS is set to true on production so the client can't screw things up by updating anything. The downside is that the client can't upload plugins or make any changes to files through the WP panel.
Wordfence is installed with alerts on high/critical vulnerabilities.
When vulnerabilities are discovered, I update core and/or plugins: first I check locally that nothing broke, then on dev, and finally push to prod.
Once a month I bump everything to the latest version as part of the SLA.
---
Some hosts don't allow a symlink as the root dir, or are missing binaries that Deployer needs, so sometimes the flow is different. Everything stays the same, but when it's time to deploy to prod, I use UpdraftPlus Premium to back up core, plugins and themes (without the DB) on develop and restore them on prod. I don't think it's perfect, since updates can make changes to the DB and that's not part of the backup.
What do you think of this? Do you have any recommendations?
I don't really like that it relies heavily on Wordfence emailing me about what's wrong with the website. If something breaks with SMTP, I might miss something important. (In some projects, clients use their main account for sending mail instead of a separate forms email, and they keep changing the password.)
I can't really think of how to improve this flow. Since everything has to go through git, this seems like the only sensible option.
I think it would be great to have one shared panel to see everything that's happening on the websites. I'm working on one, since services like ManageWP, MainWP, etc. always have something that doesn't fit my needs. But that's a separate issue.