Skip to main content

Automatic updater for phpList

Provides an easy, automated, web-based update mechanism for phpList installations.

Usage

The phpList updater gives you an easy way to upgrade your installation via web interface. In just four steps you can update your installation to the latest release.

The Updater is available in phpList 3.3.7+.

Requirements

The automatic updater requires the following PHP extensions: curl, zip and pdo.

Steps

You have to be a superadmin in order to update phpList via Automatic Updater. The updater is currently performing the following steps. If one of those steps fail, you will have the possibility to correct the error and retry from the current step.

Initialise

On the first step, several checks are performed such as if there is an update available, integration check and permissions check.

Automatic Updater Update AvailablephpList_automatic_updater_update_available.png

  1. Check if there is an update available. If there is an Update Available you can continue to the next step.
  2. Check for write permissions. All phpList should be writable by the apache HTTP user in order for the automatic updater to work. The updater stops if it finds not writable files and lists them. To continue, change file permissions for listed ones and click next to try again.
  3. Integration check. Check whether all required phpList files are in place and also if unexpected files are present. The updater stops if it finds unexpected files (not from phpList default installation) and lists them. .

Back up

The user is asked whether they want a backup of the software. Please note that this is not a database back up. Back up is recommended for users that might have changed phpList files.

If you don't need to back up the software, please choose "No" and you will continue to the next step.

Automatic Updater back upphpList_automatic_updater_no_back_up.png

If you choose yes: the user is asked for the location where to store the zip file of the phpList software. The back up will be saved in the specified location. Please note that the specified location should be writable. If you see any error, please make the requested changes and click "Next" without refreshing the page. If the back up step fails, a manual backup of the files is recommended.

Automatic Updater back upphpList_automatic_updater_yes_back_option.png

Download

The new version is downloaded to a temporary folder. Please wait until the download is finished.

Automatic Updater DownloadphpList_automatic_updater_download_in_progress.png

Perform update

This is the last phase and several steps are performed in background without user interaction as listed below:

  1. The maintenance mode is enabled so that no other actions are performed while running the automatic updater.
  2. The PHP entry points are replaced with "Update in progress" message
  3. Old files are deleted except config, updater and temporary directory
  4. The new files are moved in place
  5. The new PHP entry points are moved in place
  6. The updater code is moved to a temporary directory
  7. The temporary files are deleted
  8. The maintenance mode is disabled
  9. The new updater code is moved in place
  10. The updated sessions is deauthenticated

Done

"Updated successfully" is displayed. Redirect to the phpList dashboard by clicking "Next" button or alternatively click on phpList logo.

Automatic Updater DownloadphpList_automatic_updater_updated_successfully.png

What the updater doesn't do

The updater is at the moment solely focused on replacing the files of the core installation. It does neither:

  • Upgrade the database (this uses the existing database migration code)
  • Upgrade the plugins (this uses the existing plugin updater)

Notes

  • It is possible to override the backup checks by reloading the page when the backup check fails. Do not reload the page unless you wish to proceed without a backup in this case.
  • When the update process fails you should manually remove actions.txt file inside the config folder in order to reset the process and be able to try again.
  • The config directory is required to be writable because the "current step" of the automatic updater is saved inside it.

Disabling Automatic Updater

For admins who run phpList in a controlled environment it is necessary to be able to disable the automatic updater. To disable the automatic updater add the following in your config file:

define('ALLOW_UPDATER', false);

Report bugs

Please report issues here under automatic updater category.

Source code

The source code is available here . Feel free to contribute.