Skip to content

Upgrading and migrating

The current version number is shown in the bottom-left corner of the admin panel. Click it to check for and apply updates. Nothing needs to be done on the server.

Back up your database first. In BaoTa it is one click under Database → Backup, takes seconds, and will save you if anything goes wrong.

Docker users upgrade the same way — the program files live in the data volume, so there is no need to change the image.

Manual upgrade

Only for when the online upgrade fails. Start from your current version and apply each release in order — you cannot skip versions.

Each upgrade package contains:

ItemWhat to do
file/ directoryCopy its contents into the site root, overwriting
update.sqlOnly present when the database changes — see below

For update.sql:

  1. Open it and replace every __PREFIX__ with your table prefix (acg_ by default)
  2. Run the SQL in phpMyAdmin or any database client

When you have applied everything, set version in config/app.php to the version you upgraded to.

Manual upgrades are error-prone. Use the online upgrade whenever it works.

Migrating to another server

  1. Archive the source — the whole site directory
  2. Export the database — phpMyAdmin or mysqldump
  3. Set up the new server following the BaoTa guide, matching PHP version and extensions
  4. Extract the source into the new site root and import the database
  5. Edit config/database.php with the new host, user and password
  6. Reconfigure URL rewriting and directory permissions

If it does not come up, check in this order:

CheckWhy
config/database.phpStill pointing at the old database
RedisIf the old site stored sessions in Redis, install it here too, or switch PHP's session storage back to files
PHP extensionsDo not forget bcmath
Permissionsconfig, runtime, kernel/Install, assets/cache must be writable
URL rewritingHas to be configured again on the new server

Swapping the Docker image

bash
docker pull ghcr.io/lizhipay/acg-faka:latest
docker stop faka && docker rm faka
docker run -d --name faka -p 80:80 -v acg_data:/data --restart unless-stopped ghcr.io/lizhipay/acg-faka:latest

As long as the acg_data volume name is unchanged, your data, configuration and installed plugins are all still there.

Something broke after upgrading

Read runtime.log in the site root first — the real cause is almost always in there.

Released under the MIT License