Automatic updater for phpList
This page concerns phpList self-hosted users only. If you have a registered account at the phpList Hosted service, please contact hosted@phpList.com.
Provides an easy, automated, web-based update mechanism for phpList installations.
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+.
The automatic updater requires the following PHP extensions: curl, zip and pdo.
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.
On the first step, several checks are performed such as if there is an update available, integration check and permissions check.
- Check if there is an update available. If there is an Update Available you can continue to the next step.
- 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.
- 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. .
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.
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.
The new version is downloaded to a temporary folder. Please wait until the download is finished.
Note: The automatic Updater doesn't check for available space before proceeding with the download and the update will fail if there is not enough space for all files. Depending on how many of the files were downloaded it can show "Downgrade is not supported".
This is the last phase and several steps are performed in background without user interaction as listed below:
- The maintenance mode is enabled so that no other actions are performed while running the automatic updater.
- The PHP entry points are replaced with "Update in progress" message
- Old files are deleted except config, updater and temporary directory
- The new files are moved in place
- The new PHP entry points are moved in place
- The updater code is moved to a temporary directory
- The temporary files are deleted
- The maintenance mode is disabled
- The new updater code is moved in place
- The updated sessions is deauthenticated
"Updated successfully" is displayed. Redirect to the phpList dashboard by clicking "Next" button or alternatively click on phpList logo.
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)
- 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:
Please report issues here under automatic updater category.
The source code is available here . Feel free to contribute.