Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp core install forcefully upgrades WordPress version #161

Open
takaya1992 opened this issue Jul 2, 2020 · 3 comments
Open

wp core install forcefully upgrades WordPress version #161

takaya1992 opened this issue Jul 2, 2020 · 3 comments

Comments

@takaya1992
Copy link

takaya1992 commented Jul 2, 2020

I'm having trouble because wp core install forcibly upgrades the WordPress version.

Is it necessary to upgrade WordPress in the command?
I want to remove the upgrade process if not need it.

For example...

Specify the version and download core.
(There are cases where you want to try a past version, right?)

$ wp core download --path=/path/to/dir --version=5.4.1

Make sure you have downloaded the specified version.

$ wp core version --path=/path/to/dir
5.4.1

After setting up and creating the DB, install core.

$ wp core install --path=/path/to/dir --url=http://example.com/ --title=example --admin_user=admin --admin_password=admin --admin_email='[email protected]'
Success: WordPress installed successfully.

(Even if the command ends, the upgrade process is being executed asynchronously, so wait about 30 seconds)
Check the version of core again.

$ wp core version --path=/path/to/dir
5.4.2

The version has changed.

Please remove the WordPress upgrade process in wp core install, or any other workarounds?

@schlessera
Copy link
Member

I can't replicate this on a Linux machine. What environment are you using?

@grappler
Copy link
Contributor

grappler commented Sep 1, 2021

This could be caused by the automatic update included in WordPress. @takaya1992 Have you disabled the automatic updates? https://wordpress.org/support/article/configuring-automatic-background-updates/#constant-to-disable-all-updates

@julienloizelet
Copy link

julienloizelet commented Sep 8, 2023

Hi there,

Today, I started having problems with some of my GitHub actions: I'm using them to install and test a plugin end-to-end and I got the "Database update required" error.

After a bit of debugging, I saw that the version of WordPress being tested was not the installed version.

I was able to fix it by adding define( 'AUTOMATIC_UPDATER_DISABLED', true ); (as suggested here).

I think it would be nice to have a flag in the install command to say "disable automatic update" or something like that.

I created a repo to show the behavior. Please look at this debug action: https://github.com/julienloizelet/wp-cli-install-debug/actions/runs/6119079805

In short, here's what debugging action do:

  • Prepare the environment to use DDEV. IMO,There is no reason for this behavior to be related to a DDEV problem.
  • Download a specific version of WordPress (using the matrix value):
    • wp core download --version=${{ matrix.wp-version }}
  • Install WordPress
    • wp core install --url='some-url' --title='WordPress' --admin_user='admin' ... ...
  • Check the current version with wp core version => result is OK for all tests
  • Access the admin page and wait 20 seconds
  • Check the current version again : result is KO in some cases

Capture d’écran du 2023-09-08 17-00-27

example: the 5.6 version is automatically updated to 6.3.1

Capture d’écran du 2023-09-08 17-02-25

[EDIT]: seems to be as expected here

Starting WordPress 5.6, the default value of WP_AUTO_UPDATE_CORE for new WordPress installations is true

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants