Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:2.0:update_new [2026/10/14 15:29] – kainhofer | en:2.0:update_new [2026/10/14 16:00] (current) – kainhofer | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Updating Admidio with the Core Updater ====== | ====== Updating Admidio with the Core Updater ====== | ||
| - | Since version 6.0, Admidio provides a core updater | + | Since version 6.0, Admidio provides a Core Updater |
| - | Admidio 4.x and 5.x do not contain the updater. You add it once manually as a small package and then update **directly to the latest 6.x release**. You do not have to install the versions in between. | + | Admidio 4.x and 5.0 do not contain the updater. You add it once manually as a small package and then update **directly to the latest 6.x release**. You do not have to install the versions in between. Which releases are possible is listed in [[# |
| - | * Installing | + | The update only starts when an administrator starts it. Nothing is updated in the background. |
| - | * Running the Core Updater from 6.0 and later (with screenshots) | + | |
| + | |||
| + | * Admidio | ||
| + | * Admidio 4.x or 5.0: [[# | ||
| ===== Which versions can be upgraded ===== | ===== Which versions can be upgraded ===== | ||
| Line 17: | Line 20: | ||
| You cannot go backwards: the updater refuses to install a version that is older than the one you have. | You cannot go backwards: the updater refuses to install a version that is older than the one you have. | ||
| - | ===== Performing an Update | + | ===== Performing an update |
| - | - Make your own backup of the folder '' | + | - Optional, but recommended: |
| - | - Open **Preferences → System → Update & backup** and click **Update Admidio**. (Admidio 4.x and 5.x do not have this button yet: see chapter | + | - Open **Preferences → System → Update & backup** and click **Update Admidio**. (Admidio 4.x and 5.0 do not have this button yet: see [[# |
| - | - For developers, an update to a development version | + | - Developers can choose |
| - | - Check the requirements, | + | - [[# |
| - | - Wait until the page says " | + | - Wait until the page says " |
| - | - If there are any warnings or problems, the confirmation screen will clearly indicate it. It will also show the locations of the file and database backups.{{ : | + | |
| - | The rest of this page explains each step and what to do if one of them fails. | + | If there are any warnings or problems, the final page will clearly indicate it (see [[# |
| + | Each step is explained in detail in [[# | ||
| - | ===== Add the updater for Admidio 4.x and 5.x ===== | + | ===== Add the updater for Admidio 4.x and 5.0 ===== |
| - | Do these steps for 4.x and for 5.x alike. | + | Do these steps for 4.x and for 5.0 alike. |
| - | - **Back up** the folder '' | + | - **Back up** the folder '' |
| - **Download the updater package** '' | - **Download the updater package** '' | ||
| - | - The '' | + | |
| - | | + | - **Upload the folder '' |
| - | - **Upload the folder '' | + | |
| - **Make the files readable** for the web server (the same permissions as your other Admidio files). | - **Make the files readable** for the web server (the same permissions as your other Admidio files). | ||
| - **Open the updater in your browser:** \\ '' | - **Open the updater in your browser:** \\ '' | ||
| - If you are not logged in as administrator, | - If you are not logged in as administrator, | ||
| - | - Follow the steps of the updater. | + | - Follow the steps of the updater, described in [[# |
| - | Once Admidio 6.0 or later is installed, the updater is part of the installation and can be executed | + | Once Admidio 6.0 or later is installed, the updater is part of the installation and can be started |
| ==== Details about upgrading from earlier versions ==== | ==== Details about upgrading from earlier versions ==== | ||
| Line 50: | Line 52: | ||
| * Plugins written for 4.x are mostly **not compatible** with 6.x: ask the author for a new version. | * Plugins written for 4.x are mostly **not compatible** with 6.x: ask the author for a new version. | ||
| * New settings are added with their default values. | * New settings are added with their default values. | ||
| - | | + | * Admidio 4.x keeps its program files in the folder '' |
| - | | + | |
| * **Your own themes** in '' | * **Your own themes** in '' | ||
| - | |||
| - | |||
| - | |||
| - | This page explains | ||
| - | |||
| - | * how to update an installation that already has the Core Updater (Admidio 6.0 and later), | ||
| - | * how to **upgrade old releases, Admidio 4.x and 5.x, to the latest 6.x release**, | ||
| - | * what the updater does with your files, what to do if it stops, and how to use it on the command line. | ||
| - | |||
| - | The update only starts when an administrator starts it. Nothing is updated in the background. | ||
| ===== What you need ===== | ===== What you need ===== | ||
| ^ What ^ Why ^ | ^ What ^ Why ^ | ||
| - | | A backup of your own | The updater backs up the database. It does **not** copy the files in '' | + | | A backup of your own (recommended) |
| | PHP 8.2 or newer | The current 6.x release needs it. Ask your hosting provider, or switch the PHP version in your hosting panel, **before** you update. The updater checks it and refuses to go on otherwise. | | | PHP 8.2 or newer | The current 6.x release needs it. Ask your hosting provider, or switch the PHP version in your hosting panel, **before** you update. The updater checks it and refuses to go on otherwise. | | ||
| | The PHP extensions '' | | The PHP extensions '' | ||
| Line 75: | Line 66: | ||
| | An administrator account of Admidio | Only administrators can start or continue an update. | | | An administrator account of Admidio | Only administrators can start or continue an update. | | ||
| - | Updating is also possible if your server has little time per request: the updater works in portions of a few seconds. Only the database update is one long step (see chapter 8). | + | Updating is also possible if your server has little time per request: the updater works in portions of a few seconds. Only the database update is one long step (see [[# |
| ===== Before you start ===== | ===== Before you start ===== | ||
| - | - **Back up '' | + | - **Back up '' |
| - **Choose a quiet time.** During the file replacement visitors see a maintenance page. (Admidio 4.x and 5.0 before 5.0.15 do not know maintenance mode yet: there the pages stay reachable until the old files are removed at the end of the file replacement. Update when nobody works in Admidio.) | - **Choose a quiet time.** During the file replacement visitors see a maintenance page. (Admidio 4.x and 5.0 before 5.0.15 do not know maintenance mode yet: there the pages stay reachable until the old files are removed at the end of the file replacement. Update when nobody works in Admidio.) | ||
| - | - **Finish pending updates.** If you updated the files earlier but never finished the database update ('' | + | - **Finish pending updates.** If you updated the files earlier but never finished the database update ('' |
| - | - **Check your plugins and themes.** The plugins that come with Admidio are updated with it. Plugins and themes that you installed yourself must be available for the new version: ask their authors. Modified core files are replaced (see chapter 6): note your changes down or keep a copy. | + | - **Check your plugins and themes.** The plugins that come with Admidio are updated with it. Plugins and themes that you installed yourself must be available for the new version: ask their authors. Modified core files are replaced (see [[# |
| - **Open the updater in a normal browser window,** not in a private tab that closes by itself, and keep it open until it is finished. | - **Open the updater in a normal browser window,** not in a private tab that closes by itself, and keep it open until it is finished. | ||
| - | ===== Update an installation that has the updater (6.0 and later) | + | ===== The update step by step ===== |
| ==== Notice that an update exists ==== | ==== Notice that an update exists ==== | ||
| Line 99: | Line 90: | ||
| ==== Start the update ==== | ==== Start the update ==== | ||
| - | Click **Update Admidio**. The updater opens on a page of its own. On the left you see the steps of the update: | + | Click **Update Admidio** |
| - Check requirements | - Check requirements | ||
| Line 109: | Line 100: | ||
| - Update database | - Update database | ||
| - Finish | - Finish | ||
| + | |||
| + | {{ : | ||
| + | {{ : | ||
| + | |||
| + | Developers can choose a development version instead of the stable one (only with debug mode switched on, see [[# | ||
| ==== Check requirements ==== | ==== Check requirements ==== | ||
| Line 124: | Line 120: | ||
| Errors (red) stop the update; warnings (yellow) do not. If all is well, click **Download and prepare**. Nothing has been changed on your site so far, and **Cancel update** removes everything the updater has created. | Errors (red) stop the update; warnings (yellow) do not. If all is well, click **Download and prepare**. Nothing has been changed on your site so far, and **Cancel update** removes everything the updater has created. | ||
| + | |||
| + | {{ : | ||
| ==== Download ==== | ==== Download ==== | ||
| Line 130: | Line 128: | ||
| If the download is interrupted (browser closed, connection lost), open the updater again and click **Start or continue update**. It continues where it stopped. | If the download is interrupted (browser closed, connection lost), open the updater again and click **Start or continue update**. It continues where it stopped. | ||
| + | |||
| + | After the download the updater unpacks the release and compares its files with yours. | ||
| + | |||
| + | {{ : | ||
| ==== Review the changes ==== | ==== Review the changes ==== | ||
| Line 136: | Line 138: | ||
| * how many files are new, replaced, removed and already up to date, | * how many files are new, replaced, removed and already up to date, | ||
| - | * how many files were **changed or do not belong to the installed version**. They are kept in a ZIP archive (chapter 6), nothing is lost, | + | * how many files were **changed or do not belong to the installed version**. They are kept in a ZIP archive (see [[# |
| * under **Details of the changes** the lists of the removed and kept files. | * under **Details of the changes** the lists of the removed and kept files. | ||
| Line 142: | Line 144: | ||
| * **Back up the database before the update (recommended)**: | * **Back up the database before the update (recommended)**: | ||
| - | * **I have my own current backup of the database**: choose this only if you really have one. It is the only choice if your server cannot back up the database itself (for PostgreSQL the program '' | + | * **I have my own current backup of the database**: choose this only if you really have one (and see [[# |
| - | Click **Install update** when you are ready. **From here on the site is in maintenance mode.** | + | {{ : |
| + | |||
| + | Click **Install update** when you are ready. **From here on the site is in maintenance mode.** | ||
| ==== What happens now ==== | ==== What happens now ==== | ||
| Line 156: | Line 160: | ||
| If your server cuts off a long request, the page keeps asking the server until the database update is really finished. | If your server cuts off a long request, the page keeps asking the server until the database update is really finished. | ||
| + | |||
| + | {{ : | ||
| + | {{ : | ||
| ==== Finish ==== | ==== Finish ==== | ||
| Line 169: | Line 176: | ||
| Click **Open Admidio**. Try the start page, the login and one or two modules. Usually you stay logged in; if not, log in again. | Click **Open Admidio**. Try the start page, the login and one or two modules. Usually you stay logged in; if not, log in again. | ||
| - | The backups stay on your server until you delete them. You can download and delete them in **Preferences → System → Update & backup** (see chapter 7). | + | {{ :en:2.0: |
| + | If there are warnings or problems, the final page says so clearly, with the locations of the backups and notes for you to act on. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The backups stay on your server until you delete them. You can download and delete them in **Preferences → System → Update & backup** (see [[# | ||
| ===== What the update does with your files ===== | ===== What the update does with your files ===== | ||
| Line 213: | Line 225: | ||
| ==== Restoring a backup by hand ==== | ==== Restoring a backup by hand ==== | ||
| - | The updater restores its own backups for you if an update fails (chapter 8). To restore a backup by hand, unpack the ZIP, then import the files into the database in the order of their names, for example with phpMyAdmin or | + | The updater restores its own backups for you if an update fails (see [[# |
| <code bash> | <code bash> | ||
| Line 236: | Line 248: | ||
| * Any other browser or computer: log in with the **login name, password** and, if you use two-factor authentication, | * Any other browser or computer: log in with the **login name, password** and, if you use two-factor authentication, | ||
| - | The page then shows where the update stands and continues from there, or shows the buttons for the situation | + | The page then shows where the update stands and continues from there, or shows the buttons for the situation: [[# |
| ==== An error while the files are installed ==== | ==== An error while the files are installed ==== | ||
| Line 253: | Line 265: | ||
| * **Restore version X and look for a corrected release:** the same, but a new update starts at once. If a fixed release has been published in the meantime, it is offered. | * **Restore version X and look for a corrected release:** the same, but a new update starts at once. If a fixed release has been published in the meantime, it is offered. | ||
| - | If you chose "I have my own current backup" | + | If you chose "I have my own current backup" |
| When the database update "has not reported back", it may still be running. Wait a few minutes and reload the page before you retry it. | When the database update "has not reported back", it may still be running. Wait a few minutes and reload the page before you retry it. | ||
| Line 267: | Line 279: | ||
| ===== Using the command line ===== | ===== Using the command line ===== | ||
| - | If you have shell access (SSH), you can run the same update without a browser. The commands do exactly what the pages do and ask the same two questions: before the download and before the installation. | + | If you have shell access (SSH), you can run the same update without a browser. The commands do exactly what the pages do (see [[# |
| - | Go to the main folder of your Admidio installation and run (as the user that owns the Admidio files; if you use another user, the new files belong to that user and later updates in the browser may fail): | + | There are two ways to start the update: |
| + | |||
| + | ^ ^ Updater script ^ '' | ||
| + | | Command | '' | ||
| + | | Available in | every installation that contains the updater, including 4.x and 5.0 after you added it | Admidio 6.0 and later | | ||
| + | | Works while Admidio cannot start (unfinished update, maintenance mode) | Yes | No | | ||
| + | | Needs | nothing else | the command line enabled in '' | ||
| + | |||
| + | ==== The updater script ==== | ||
| + | |||
| + | Go to the main folder of your Admidio installation and run: | ||
| <code bash> | <code bash> | ||
| Line 276: | Line 298: | ||
| </ | </ | ||
| - | This works in every installation that contains | + | Other commands of the script: |
| + | |||
| + | <code bash> | ||
| + | php install/ | ||
| + | php install/ | ||
| + | </ | ||
| + | |||
| + | If an update stops half way and Admidio no longer starts (see [[# | ||
| + | |||
| + | ==== The admidio utility ==== | ||
| + | |||
| + | The utility '' | ||
| + | |||
| + | * The command line is switched off by default. Enable it in '' | ||
| + | |||
| + | <code php> | ||
| + | $gCliEnabled = true; | ||
| + | </ | ||
| + | |||
| + | * Commands that change something act in the name of an Admidio administrator. Name the account with '' | ||
| - | For installations of Admidio 6.0 and later, the CLI utility can be used, too: | ||
| <code bash> | <code bash> | ||
| cd / | cd / | ||
| - | ./admidio update: | + | ./admidio update: |
| + | ./admidio update: | ||
| + | ./admidio update: | ||
| + | ./admidio update: | ||
| </ | </ | ||
| + | If the file is not executable on your system, put '' | ||
| - | Useful | + | If an update stops and Admidio cannot start any more, the utility cannot help; continue with the [[# |
| + | |||
| + | ==== Options ==== | ||
| + | |||
| + | The options | ||
| ^ Option ^ Meaning ^ | ^ Option ^ Meaning ^ | ||
| Line 291: | Line 339: | ||
| | '' | | '' | ||
| | '' | | '' | ||
| - | | '' | + | | '' |
| | '' | | '' | ||
| | '' | | '' | ||
| | '' | | '' | ||
| | '' | | '' | ||
| + | | '' | ||
| - | Other commands: | + | For '' |
| - | + | ||
| - | <code bash> | + | |
| - | php install/ | + | |
| - | php install/ | + | |
| - | </ | + | |
| - | + | ||
| - | '' | + | |
| - | + | ||
| - | The exit code tells scripts what happened: 0 = done, 1 = error, 2 = wrong options, 5 = refused (for example a failed requirement check), 6 = the update could not be completed. | + | |
| - | In Admidio 6.x with the Admidio command line enabled you can also use '' | + | The exit code tells scripts what happened: 0 = done, 1 = error, 2 = wrong options, 5 = refused (for example a failed requirement check), 6 = the update could not be completed. ('' |
| ===== Questions and answers ===== | ===== Questions and answers ===== | ||
| Line 316: | Line 356: | ||
| **Can I go back to the old version afterwards? | **Can I go back to the old version afterwards? | ||
| - | Until the database update has started, the updater can put back the previous files (button or '' | + | Until the database update has started, the updater can put back the previous files (button or '' |
| **How long does an update take?**\\ | **How long does an update take?**\\ | ||
| Line 325: | Line 365: | ||
| **Why does the updater say " | **Why does the updater say " | ||
| - | The release that is announced has no package for the updater yet, or your version is older than 4.0. Download the release from the Admidio website and update by hand, as described in its documentation. | + | The release that is announced has no package for the updater yet, or your version is older than 4.0. Download the release from the Admidio website and update by hand, as described in its documentation |
| **Do I need the updater package for every update?**\\ | **Do I need the updater package for every update?**\\ | ||
| - | No, only once for an installation older than 6.0. From 6.0 on the updater is part of Admidio and updates itself with every release. | + | No, only once for an installation older than 6.0 (see [[# |
| **Can I still update by hand?**\\ | **Can I still update by hand?**\\ | ||
| Line 337: | Line 377: | ||
| **Where do I find the old archives and backups? | **Where do I find the old archives and backups? | ||
| - | In **Preferences → System → Update & backup**, in the list of backups, and in the folder '' | + | In **Preferences → System → Update & backup**, in the list of backups |