Thank you for beta testing! These instructions describe how to install the Automatic Updates module into a Drupal site, and use it to update Drupal core.

Please report your test result when finished.

Pre-Requisites

  1. Access to the command line.
  2. PHP 7.3 or later: run php --version or visit /admin/reports/status/php in your Drupal site to confirm what version is installed.
  3. Composer 2.3.5 or later. 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

The preferred method of creating a site for local development is our fully-automated script--instructions in DEVELOPING.md. If you can't and prefer not to use it, use the following instructions to set it up manually.

  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

  1. Open the 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. Click "Extend" in the navigation menu.
  2. Search for "Automatic Updates".
  3. Select the checkbox for "Automatic Updates".
  4. Click "Install" button at the bottom of the page.
  5. You may be redirected to a page detailing additional modules will be enabled. 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. Ensure you're on the "Extend" page (/admin/modules) and click the "Update" tab.
  2. You should see a newer version of Drupal 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.
  3. Click the "Update" button. You should be redirected to a page with a progress bar.
  4. When you see a "Ready to update" screen, click the "Continue" button.
  5. You should see an "Apply updates" screen with a progress bar.
  6. 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.
  7. 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 can cause Automatic Updates to fail. To get around this, we recommend configuring Automatic Updates to use rsync, if you have it available; run which rsync or whereis rsync to determine its location, if it's installed. Then, run the following commands (replace /full/path/to/rsync with the actual path to rsync):

drush config:set package_manager.settings file_syncer rsync
drush config:set package_manager.settings executables.rsync /full/path/to/rsync

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

Theresa.Grannum created an issue. See original summary.

Theresa.Grannum’s picture

Issue summary: View changes
Theresa.Grannum’s picture

Title: [DrupalCon] - Automatic Updates 8.x-2.x testing guide for local environments » [DrupalCon Prague] - Automatic Updates 8.x-2.x testing guide for local environments
Theresa.Grannum’s picture

Assigned: Theresa.Grannum » Unassigned
TravisCarden’s picture

Component: Code » Documentation
Priority: Normal » Major
Status: Active » Needs work
Parent issue: #3275810: 8.x-2.x Beta Testing Instructions »
Related issues: +#3275810: 8.x-2.x Beta Testing Instructions

@Theresa.Grannum, there's a fair bit of relevant detail in #3275810 #3308319: Automatic updates 8.x-2.x testing guide for hosting environments that's absent here. Did you consider copying it as a starting point and modifying it from there? Could you try that and insert the following at the top of the "Testing with a new Drupal Project" section?

The preferred method of creating a site for local development is our fully-automated script--instructions in <a href="https://git.drupalcode.org/project/automatic_updates/-/blob/8.x-2.x/DEVELOPING.md">DEVELOPING.md</a>. If you can't and prefer not to use it, use the following instructions to set it up manually.
tedbow’s picture

@TravisCarden I don't think the script will work because the site would be on 9.5.0-dev and we don't support dev through the UI

anish.a’s picture

I had hit an error that complains about composer not allowing plugins.

  composer/installers contains a Composer plugin which is blocked by your allow-plugins config. You may add it to the list if you consider it safe.                           
  You can run "composer config --no-plugins allow-plugins.composer/installers [true|false]" to enable it (true) or disable it explicitly and suppress this exception (false)  
  See https://getcomposer.org/allow-plugins                 

If you try to run any composer commands, the composer will prompt you to allow the plugins.

anish@anish-ThinkPad-X13-Gen-1:~/Projects/test$ composer show drupal/automaticupdates
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
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
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

In ShowCommand.php line 297:
                                                                                                           
  Package "drupal/automaticupdates" not found, try using --available (-a) to show all available packages.  
                                                                                                           

show [--all] [--locked] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [--ignore IGNORE] [-M|--major-only] [-m|--minor-only] [--patch-only] [-D|--direct] [--strict] [-f|--format FORMAT] [--no-dev] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<package> [<version>]]
tedbow’s picture

Issue summary: View changes
kjankowski’s picture

@anish.a I had exactly the same problem. I can confirm that simply running composer install will help you to add those plugins to allow-plugins section in composer.json.

TravisCarden’s picture

Oops, @Theresa.Grannum. I linked to the wrong issue in comment #4. The issue containing the missing detail, which I think this one should be based on, is #3308319: Automatic updates 8.x-2.x testing guide for hosting environments.

@tedbow, that's fine to omit the bit about the local dev setup script. But, for the record, if anyone should choose to take that approach, the script can be easily configured to install whatever version of Drupal core you want using its DRUPAL_CORE_BRANCH environment variable (as documented in DEVELOPING.md). This, for example, would install 9.4.6:

DRUPAL_CORE_BRANCH="9.4.6" /bin/bash -c "$(curl -fsSL https://git.drupalcode.org/project/automatic_updates/-/raw/8.x-2.x/scripts/setup_local_dev.sh)"

Maybe we should change the script to default to the the latest core tag, @tedbow. Otherwise, if we can't recommend that people use it, that seems to defeat its whole purpose.

@anish.a and @kjankowski, the Composer plugins problem is due to outdated instructions here. I've updated the description with the current ones taken from #3308319: Automatic updates 8.x-2.x testing guide for hosting environments. Specifically, see Testing with an existing Drupal Project above.

Theresa.Grannum’s picture

Issue summary: View changes
Theresa.Grannum’s picture

Issue summary: View changes
tedbow’s picture

Issue tags: +contrib-only
phenaproxima’s picture

Status: Needs work » Closed (outdated)

8.x-2.x is no longer supported so I'm closing this one out.