Back up and restore
Know which files and data to back up, including the app key that unlocks stored tokens, with example commands for MySQL and SQLite and the steps to restore.
On this page
Chatilo has no backup screen. You back it up with your server's own tools. Three things together make a complete backup: the database, config/config.php and the uploaded files.
What to back up
| What | Where | Why |
|---|---|---|
| The database | Your MySQL or MariaDB database, or the file storage/chatilo.sqlite | Every workspace, contact, message, payment, invoice and setting |
| The configuration | config/config.php | The database details, the site URL and the app key |
| Uploaded files | storage/uploads/ | Files uploaded by each workspace (one folder per workspace) and partner logos |
| The update key | config/update-key.php | The public key your update packages are checked against. It can be set again with php bin/update.php --set-key |
| The install marker | storage/installed.lock | Without it the installer starts again |
You do not need to back up storage/cache/ or storage/sessions/. Losing sessions only signs everyone out. storage/logs/ is optional.
Keep a copy of the application code for the version you run, or the update package you last installed, so you can put the same version back.
The private key that signs your update packages is not on the server. Back it up from the computer where you build packages.
Back up a MySQL or MariaDB database
Run this over SSH. The database name and user are in config/config.php.
mysqldump --single-transaction -u DB_USER -p DB_NAME | gzip > /home/SITE_USER/backups/db-$(date +%F).sql.gz
Your hosting panel may also offer scheduled database backups. Those are fine as long as you also copy config/config.php and storage/uploads/.
Back up a SQLite database
The SQLite database runs in write-ahead mode, so recent changes can sit in the files storage/chatilo.sqlite-wal and storage/chatilo.sqlite-shm next to the main file. Do not copy only the main file while the site is running. Take a consistent copy with the sqlite3 tool:
sqlite3 storage/chatilo.sqlite ".backup '/home/SITE_USER/backups/chatilo-$(date +%F).sqlite'"
Back up the files
From the application folder:
tar -czf /home/SITE_USER/backups/files-$(date +%F).tar.gz config storage/uploads storage/installed.lock
Copy the backups off the server. A backup on the same disk does not survive losing the server.
The backups the updater takes
Before each software update, the files it replaces and a full copy of the database are saved in storage/backups/. These exist so an update can be undone. They are taken only when you update, they sit on the same disk, and older ones are deleted automatically. Do not rely on them as your only backup.
Restore
- Put the application code in place, the same version the backup was taken from, with the web root pointing at
public. - Unpack the files backup into the application folder so that
config/config.php,storage/uploads/andstorage/installed.lockare back. Do this before you open the site in a browser. Ifconfig/config.phporstorage/installed.lockis missing, the installer starts, and finishing it writes a new app key. - Make
configandstoragewritable by the site user, and make sure the foldersstorage/logs,storage/cacheandstorage/sessionsexist. - Restore the database (see below).
- If the database details or the site address changed, edit the
dbandurlvalues inconfig/config.php. - Add the cron job again. See Set up the background worker.
- Sign in and open System. Check that Background worker shows Running and Database updates shows Up to date.
To restore a MySQL or MariaDB dump into an empty database:
gunzip -c /home/SITE_USER/backups/db-2026-12-05.sql.gz | mysql -u DB_USER -p DB_NAME
To restore a SQLite backup, stop the cron job first, then replace the database file and remove the leftover write-ahead files:
cp /home/SITE_USER/backups/chatilo-2026-12-05.sqlite storage/chatilo.sqlite
rm -f storage/chatilo.sqlite-wal storage/chatilo.sqlite-shm
After moving to a new address
Webhook addresses contain the site URL. If the address changed, update the webhook address at each payment gateway and ask customers to update the webhook in their Meta app. Chat widget code on customers' websites also points at the old address.
Common problems
After a restore, numbers show as disconnected and gateway keys are gone
The database was restored with a different config/config.php, so the app key does not match. Put the original config/config.php back.
The installer appears after a restore
config/config.php or storage/installed.lock is missing. Restore them; do not complete the installer.
"Something broke on our side" on every page after a restore
Open storage/logs/php-error.log and the newest storage/logs/app-…log. The usual causes are wrong database details in config/config.php or folders that are not writable.