Anasaki Studio

Settings and maintenance

Updating and moving from the built-in plugins

Update Anasaki Studio safely, pin a version, add the Site Code database to a site installed earlier, and what happens to the former built-in plugins when upgrading to 2.0

7 min readLast updated

View as Markdown

On this page

A normal update#

  1. Always back up first — Export / import or a copy of the Docker volumes
  2. In the folder with docker-compose.yml, run:
    docker compose pull && docker compose up -d
  3. Open the admin and check the number under Site settings → General → System version

All data lives in volumes, so nothing is lost; the database structure is updated automatically on start.

Pinning a version#

A live site should pin a version instead of latest and move up when you are ready:

STUDIO_IMAGE=chichat/anasaki-studio:2.0.5

Tags: X.Y.Z (e.g. 2.0.5), X.Y (2.0 = the latest patch of 2.0), X and latest. Pre-releases such as 2.1.0-rc.1 never become latest.

Some plugins need a minimum system version (minCore). On an older system they cannot be installed, and the Store shows "Requires system vX+".

Sites installed before the Site Code database#

The current docker-compose.yml needs CODE_DB_PASSWORD, and the script docker/mysql-init/10-site-code.sh runs only while the database volume is empty (a new install). A site installed earlier creates the database once by hand:

  1. Download the new docker-compose.yml and docker/mysql-init/10-site-code.sh (keep your .env) — the commands are in Getting started
  2. Add to .env:
    CODE_DB_PASSWORD=a-new-password-letters-and-digits
  3. Open MySQL as root and run the statements below (with the same password as CODE_DB_PASSWORD)
    docker compose up -d mysql
    docker compose exec mysql mysql -uroot -p
    CREATE DATABASE IF NOT EXISTS `anasaki_code` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    CREATE USER IF NOT EXISTS 'anasaki_code'@'%' IDENTIFIED BY '<password>';
    GRANT ALL PRIVILEGES ON `anasaki_code`.* TO 'anasaki_code'@'%';
    GRANT ALL PRIVILEGES ON `anasaki_code`.* TO 'anasaki'@'%';
  4. docker compose pull && docker compose up -d

Until then Site Code runs in "fallback mode" (its tables live in the CMS database, prefixed sc_). Site Code → Database shows these SQL statements with your database name, ready to copy. See The Site Code database.

Upgrading to 2.0: the built-in plugins moved to the Plugin Store#

Since 2.0 nothing is built in any more: the 7 former features are official plugins installed from the Plugin Store, and "Backup" became the built-in Export / import.

Former pluginOfficial plugin (id)
Visitor statisticsanalytics
SEO + sitemapseo
Contact formsforms
Redirects + 404 logredirects
Cookie consentcookie-consent
Maintenance modemaintenance
Custom codecustom-code

The automatic move#

When the new version starts (and every minute after), the system looks for former plugins that were switched on or still have data, and handles them one by one:

  1. Downloads the official plugin from the Store and checks it really is the official one
  2. Installs and activates it, approving the permissions on the administrator's behalf — recorded as "permissions approved by the automatic move" with the time and the list
  3. Copies the settings (same names) and moves the old data, such as forms and submissions (keeping their numbers, so pages with a form block keep working), redirect rules, per-page SEO and statistics
  4. A former plugin that was switched off but has data is installed and its data moved, but it stays off

While a move is pending, the admin shows "N plugins are waiting to move to official plugins"; that feature is off for the moment but the site works normally.

If a move fails#

  • It retries by itself (after 1, 2, 4 … minutes, at most hourly), or press Try again
  • A site that cannot reach the Store: download the official plugin's .zip from the Plugin Store website and press Upload a zip instead
  • See each one's status under Plugins → Installed in "Moving from the former built-in plugins"

Cleaning up old data#

Old data is never deleted automatically. Once you have checked that the official plugin works, press Clean up old data on it to delete the former built-in's tables and settings (the official plugin's data is not affected).

"Clean up old data" cannot be undone — back up first, and it is available only after the move has finished.

Bypass links of the former maintenance mode stop working after the move; testers open the bypass link again.

Notes for later versions#

  • 2.3.0 — the admin keeps its session in an HttpOnly cookie: everyone signs in again once after updating. Saving a published page in the designer keeps a draft until you press Publish.
  • 2.4.0 — packages from the official Plugin Store are signed and checked before install; nothing to set up. There is a new Activity log for administrators.