Database

Database

Supported database systems

  • MySQL 8 or MariaDB 10.6 (the default in .env.example)
  • PostgreSQL
  • SQLite, suitable for a trial

The release has been tried on SQLite and MySQL. Install the matching PDO driver (pdo_mysql, pdo_pgsql or pdo_sqlite).

Configuration

Set DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD in .env. For SQLite set DB_CONNECTION=sqlite and DB_DATABASE to the absolute path of an empty file. Create the database and the user first.

Creating the tables

php artisan cms:install creates the tables and loads modules, permissions and translations (about a minute). Running it again is safe. Each module carries its own migrations in cms/<Module>/database; when you install or upgrade a module, its migrations run as part of that process.

Back up before upgrading

Make sure a recent backup exists before you upgrade the core or install a module. See Backups.