Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

SQLite for development

Run a DXP project on SQLite with no database server - the DSN, the synchronous messenger transport, the install, file permissions, the two typical errors and the limits that keep SQLite out of busy production sites.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/dxp-developers/sqlite-for-development.md

On this page

SQLite for development

This page is for developers who want a DXP project running on a laptop, in a test pipeline or on a demo server without installing a database server. SQLite support is one of the things the DXP adds over the upstream line (Who is the Exponential Foundation?).

Contents

  1. Five steps
  2. Two errors you will meet
  3. Limits
  4. Moving to a server database later

Five steps

  1. Check the extensions.

    php -m | grep -i sqlite      # expect SQLite3 and pdo_sqlite
  2. Set the DSN in .env.local, and remove the DATABASE_DRIVER, DATABASE_HOST and other parts:

    DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_%kernel.environment%.db"
    MESSENGER_TRANSPORT_DSN=sync://

    The messenger line matters: the default Doctrine transport needs a second database connection, which SQLite may not give it; sync:// handles messages in the same request (Messenger and notifications).

  3. Install. The command creates var/data_dev.db (or var/data_prod.db), imports the seed content and creates the Doctrine tables.

    php bin/console exponential:install exponential-oss
  4. Let the web server write the file. SQLite writes to the file on every edit:

    chmod 664 var/data_dev.db
    chown "$USER":www-data var/data_dev.db     # your web server's group
  5. Clear the cache: php bin/console cache:clear.

Two errors you will meet

ErrorCauseFix
no such table: ibexa_sectionThe database file was never initializedRun the install command; if an empty file exists, remove it first and install again
attempt to write a readonly databaseThe install ran as another user than the web serverFix the owner and mode as in step 4

Limits

From the skeleton's guide:

LimitImpact
No concurrent write transactionsWrites queue up under load and can time out
No replication or clusteringOne server only
No FULLTEXT indexFull-text search falls back to LIKE queries
File-level lockingThe file must be on a local file system, not NFS or CIFS

SQLite is right for development, automated tests, demos and air-gapped installations. Use MySQL 8.0, MariaDB 10.6 or PostgreSQL 14 or newer for any public or multi-user site.

Moving to a server database later

The skeleton's guide converts a SQLite project to MySQL with sqlite3-to-mysql or to PostgreSQL with pgloader. Afterwards remove the SQLite DSN and the sync:// transport from .env.local (Databases, Converting between engines).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x