# Updating

## One click (recommended)

**License and version** in the admin area shows when a new version is available. **Update to … now**:

1. downloads the package and checks it against the checksum signed by the license server,
2. backs up the installation files and the database to `storage/backups/` (the 3 newest are kept),
3. installs the new files (`config/` and `storage/` are never touched) and applies the database changes.

If a step fails, the previous files are put back and the database backup stays in `storage/backups/`.
Command line: `php bin/console update` (`--check` only shows what is offered). Tick **Install patch releases
automatically** to let the cron install patch releases (e.g. 1.0.x) at night; administrators get an e-mail.

Needs the PHP extensions zip and curl, and the web server user must be able to write the installation files
(true on CWP, cPanel and other suPHP / PHP-FPM-per-user servers). Otherwise the page says why; update by hand.

## By hand

1. Back up the database and the installation folder (above all `config/config.php` and `storage/`).
2. Unpack the new version over the old one. Keep `config/` and `storage/` (the package contains no
   config.php, so it is never overwritten).
3. Apply database changes: in the admin area a notice links to **License and version → Apply database
   updates**, or run `php bin/console migrate`.
4. Custom theme: run `php bin/console theme:publish`; compare your overridden templates in `themes/<name>/views/`
   with the new `views/` files.
