Downgrade WP when deploy

Hi, I have wordpress updated to 4.4 at development and staging environment. But, when I deploy to staging, WP downgrade to 4.3.1 (in remote server).

I did a server provision first without results.

How can I setup to deploy WP 4.4? Thanks.

Does the remote repo have WP 4.4 specified in its composer.json? Any chance your local version of the repo has v4.4 in composer.json but you haven’t pushed that update to your remote repo? (deploy to staging will pull the WP version from the remote repo’s composer.json)

1 Like

Ok, I did it, but nothing change. My steps:

  1. Edit composer.json
  2. git push to remote
  3. Check composer.json at remote repo (see screencapture bellow)
  4. Check repo at group_vars/staging/wordpress_sites.yml (it is OK*)
  5. Provision server ansible-playbook -i hosts/staging server.yml --ask-become-pass
  6. Deploy Bedrock ./deploy.sh staging esterpartegas.e451.net

is there something I forget?

*repo: git@bitbucket.org:aitormendez/esterpartegas.git

Verify that your composer.lock file in your repo has johnpbloch/wordpress at 4.4 as well.

1 Like

I’ve changed version to 4.4, but still deploying 4.3.1

"name": "johnpbloch/wordpress",
            "version": "4.4",
            "source": {
                "type": "git",
                "url": "https://github.com/johnpbloch/wordpress.git",
                "reference": "cfcf25eb42baeb7316a61c7a64e9a1ab3e291f2f"
            },

Just version should be changed, without source changes?

Sorry I wasn’t clear. You shouldn’t manually edit composer.lock.

The steps are:

  1. Update composer.json to bump/change a version
  2. Run composer update to update dependencies
  3. Commit your changes (for composer.json and composer.lock)
  4. Deploy
2 Likes

Damn, I’m a total ignorant about composer. This is my first contact with it.

I’ll go to try these steps. Thank you.

It works! Thank you very much, as ussual. :smile:

Links to learn about this issue:

1 Like