-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The problem:
Our current deployment recipe doesn't allow for auto-udpating WordPress.
It installs WordPress on deploy, which can be problematic (e.g. if you commit and test work the previous day, then WordPress launch a major version change, and you deploy the day after, the deployment could break things).
Using a symlink for WordPress core would be good in some ways, although it would mean deployments aren't atomic, and in any case it seems to cause issues with WordPress that are difficult to resolve.
The solution:
We should modify the deployment recipe so that on deploy, it copies the wordpress directory from the previous deployment. This would keep deployments atomic, avoid the need for a symlink (or having WordPress core in version control), and allow us to enable WordPress core auto-updates on these sites.
Some things that still need considering with this approach:
- We only want to allow auto-updates for minor WordPress core versions, and we want major version updates to be a manual process. @simonrjones has suggested we should keep the WordPress core version tracked in source control somehow (maybe in a config file?) and use that on deploy to trigger
wp core download --version=xif the major version has changed. Another approach would be to add a parameter on deploy for--wp-core-versionwhich we could use to triggerwp core download --version=xon deployment (although this would leave us with no record of the version updates in source control) - How does this work on the first deployment? We need some way of executing
wp core downloadif no previous release exists