Skip to content

Copy wordpress folder from previous release so that we can allow for auto-updating WordPress #27

@sean-dunwoody

Description

@sean-dunwoody

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:

  1. 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=x if the major version has changed. Another approach would be to add a parameter on deploy for --wp-core-version which we could use to trigger wp core download --version=x on deployment (although this would leave us with no record of the version updates in source control)
  2. How does this work on the first deployment? We need some way of executing wp core download if no previous release exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions