Thank you for testing Automatic Updates! In this round of testing we are interested in running Automatic Updates on hosting providers such as Bluehost, SiteGround, Dreamhost, GoDaddy, etc. These instructions describe how to install the Automatic Updates module into a Drupal site and test using it to update Drupal core.

Please report your test result when finished.

Prerequisites

  1. A hosting account at a provider such as Bluehost, SiteGround, Dreamhost, GoDaddy, etc.
  2. Access to the terminal (command line).
  3. PHP 7.3 or later. (Run php --version or visit /admin/reports/status/php in your Drupal site to confirm what version is installed.)
  4. Composer 2.3.5 or later. (Installation and setup instructionsfollow all the steps in order for the Composer commands in this guide to work properly.) (Run composer --version to find out what version of Composer you have. If it's older than 2.3.5, run composer self-update --2.)

Once the pre-requisites are fulfilled, you can either test with a new Drupal site or install Automatic Updates in an existing site.

Testing with a new Drupal Project

  1. Open a terminal (command line).
  2. Run the following commands, replacing TEST_DIR with your intended local test directory or your virtualhost directory on a remote test server.
    composer create-project drupal/recommended-project:9.4.0 TEST_DIR --no-install --no-interaction
    cd TEST_DIR
    composer config allow-plugins.composer/installers true
    composer config allow-plugins.drupal/core-project-message true
    composer config allow-plugins.drupal/core-composer-scaffold true
    composer require 'drupal/automatic_updates:^2' --no-interaction --with-all-dependencies
  3. Rename the docroot (i.e., browsable site directory), if necessary. For example, on a remote test server, your hosting provider might use docroot or htdocs.
    mv web YOUR_DOCROOT
  4. For local testing, use Drupal's built-in "quick-start" script to start a lightweight temporary server:
    cd YOUR_DOCROOT
    php ./core/scripts/drupal quick-start standard

    You should see a browser open and log you into the new Drupal site.

  5. For testing on a remote test server, take whatever steps your hosting provider requires to make the new codebase "browseable" and navigate to the test address in your browser.
  6. You can now take the next steps.

Testing with an existing Drupal Project

This test will only be valid if your Drupal core version is not up to date. Otherwise, there will be no Drupal core update to apply.

  1. Open the terminal (command line) and navigate to the directory of your Drupal project.
  2. Run: composer require 'drupal/automatic_updates:^2' --with-all-dependencies
  3. Log in to your Drupal site as an administrator. You can now take the next steps.
  4. IMPORTANT: If you have Drush installed, please see this note.

Install the Automatic Updates module

  1. Visit the "Extend" page (/admin/modules).
  2. Search for "Automatic Updates".
  3. Check the checkbox for "Automatic Updates".
  4. Click the "Install" button at the bottom of the page.
  5. You may be redirected to a page detailing additional modules will be enabled. If so, click the "Continue" button.
  6. You should see a message telling you that Automatic Updates (and possibly other modules) have been enabled.

Use Automatic Updates to update Drupal

  1. Visit the "Extend" page (/admin/modules).
  2. Click the "Update" tab.
  3. You should see a newer version of Drupal, corresponding to the latest stable release at the Drupal download page, as the recommended version. (If you installed Automatic Updates into an existing Drupal site, you won't see this if you're already fully up to date. In that case, you may want to start again with a new Drupal project or try on a different existing site where core is not up to date.)
  4. Click the "Update" button. You should be redirected to a page with a progress bar.
  5. When you see a "Ready to update" screen, click the "Continue" button.
  6. You should see an "Apply updates" screen with a progress bar.
  7. You should be redirected to the "Available updates" page and see the message "Update complete!". If database updates are needed, you should be redirected to /update.php to run those; follow the instructions and you should get redirected to the "Available updates" page when finished.
  8. You should see that Drupal core is fully up-to-date.

You may run into a known issue or limitation; see the project page for more information.

If you have Drush installed: There is a known issue where Drush installs a dependency that contains symbolic links, which will make Automatic Updates refuse to attempt an update. See the module README for a workaround.

Thanks for testing!

Please let us know how it went.

Were these instructions unclear or inaccurate? Please leave a comment on this issue to tell us about it.

Comments

Gábor Hojtsy created an issue. See original summary.

Theresa.Grannum’s picture

Instructions look great! Really easy to follow.

I have minor feedback - I think it may be helpful expand the instructions mentioned in Testing with an existing Drupal Project similar to point #2 under Use Automatic Updates to update Drupal. It's a small concern but some users may read it as they're not eligible to test if their site is up to date.

TravisCarden’s picture

Issue summary: View changes

@tedbow the rsync file_syncer workaround for symlinks shouldn't work anymore, since Composer Stager now refuses to even try to even try if it finds any. I've replaced that bit above with a link to the new workaround in the README. We should probably update the Known Issues on the project page, which mention the problem but don't indicate any solution at all.

@Gábor Hojtsy I din't find it entirely clear which terminal commands you meant to be run locally versus on the server, or which place the prerequisites refer to. Could you clarify?

@Theresa.Grannum would you like to propose a specific change to address your feedback? "Be bold." :)

It might be valuable to have a few carefully chosen screenshots. @Theresa.Grannum might find it convenient to take some as she prepares her demo if others think so. ¯\_(ツ)_/¯

I've made a few changes for clarity and consistency, mostly.

Gábor Hojtsy’s picture

@Theresa.Grannum: hah, it is almost entirely a copy so far for your beta instructions, so thank you! :) Also I added this earlier to the existing project section, maybe it is not visible enough due to being above the list?

This test will only be valid if your Drupal core version is not up to date. Otherwise, there will be no Drupal core update to apply.

@TravisCarden: thanks for the updates. Re which commands need to run where, it depends on the hosting setup. If it has a live IDE environment, then all commands would be run on that environment. If people have a local codebase copy and need to push to a dev/staging environment, that would be different. Can we make suggestions that are agnostic enough without being overly descriptive? "Environment where you assemble the codebase" vs. "Hosted environment where the Drupal runtime lives"?

TravisCarden’s picture

Issue summary: View changes
Theresa.Grannum’s picture

@TravisCarden - thank you for the encouragement! Yes, the specific change was addressed by @Gábor Hojtsy and taking a second I did overlook it on the first read. Perhaps, it's helpful to bold the comment?

This test will only be valid if your Drupal core version is not up to date. Otherwise, there will be no Drupal core update to apply.

Open to discussion on this.

I'm also happy to help with taking screenshots to add visuals, I'll be removing add the AU module for presentation and using project browser instead so it would be worth that footage not going to waste. @Gábor Hojtsy @tedbow - will need some guidance adding them to the instructions, I usually have a hard time adding images to drupal.org issues.

Gábor Hojtsy’s picture

Issue summary: View changes

Created hosting specific template issue at #3309680: [DrupalCon] Automatic Updates hosting test result (template), updated links to report to clone that issue.

kraut’s picture

Test driving with Composer v2.4.2, Drush 11.1.1 on PHP8.1 (Ubuntu built) the --non-interactive doesn't work and docs above should be changed:

composer create-project drupal/recommended-project:9.4.0 test --no-interaction
...
Package operations: 62 installs, 0 updates, 0 removals
composer/installers contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "composer/installers" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
  - Installing composer/installers (v1.12.0): Extracting archive
drupal/core-composer-scaffold contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "drupal/core-composer-scaffold" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y│
,n,d,?] y
  - Installing drupal/core-composer-scaffold (9.4.0): Extracting archive
drupal/core-project-message contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "drupal/core-project-message" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n│
,d,?] y
...
TravisCarden’s picture

Issue summary: View changes

Thanks, @kraut. I've updated the instructions to fix the problem like so:

# Skip installation to avoid plugin errors.
composer create-project drupal/recommended-project:9.4.0 test --no-install --no-interaction

cd test

# Allow plugins.
composer config allow-plugins.composer/installers true
composer config allow-plugins.drupal/core-project-message true
composer config allow-plugins.drupal/core-composer-scaffold true

# Everything will be installed now.
composer require 'drupal/automatic_updates:^2' --no-interaction --with-all-dependencies

cd web
php ./core/scripts/drupal quick-start standard
TravisCarden’s picture

Issue summary: View changes
TravisCarden’s picture

Issue summary: View changes
tedbow’s picture

Issue tags: +contrib-only
phenaproxima’s picture

Status: Active » Closed (outdated)

I think we can close this one out; 8.x-2.x is no longer supported.