
Prerequisites
Before you start, make sure you:- Install the Turso CLI
- Sign up or login to Turso
- Have an PHP Application with Doctrine DBAL
- Linux
- Mac/Darwin
- Windows (WSL) / Devcontainer
Turso PHP Installer (Linux/macOS only)
Turso PHP Installer (Linux/macOS only)
Get the installer:Add as a global executable script:UsageInstall Turso Client PHP / libSQL Extension:Check on your console/terminalUpdate Turso Client PHP / libSQL Extension:Uninstall Turso Client PHP / libSQL Extension:
Manual Configuration
Manual Configuration
- 📦 Extract the archive
- 🗃 Locate somewhere in your machine
- 💽 Copy a relative path that address that extension/driver
- 📂 Open
php.inisearch;extensionif you using nano (ctrl+w) then searching for it - 📝 add in the next-line
extension=liblibsql_php.so(in Linux) without;at the begining
LibSQL class is available in your PHP environment! You can use it everywhere in your PHP project 🎉
Configure database credentials
Get the database URL:Get the database authentication token:Assign credentials to the environment variables inside
.env.Save this later when you need to connect to Remote and Embedded Replica
Configure database connection
Setup the environment variable in your Laravel application, choose what the type connection you need.Other environment variables (Embedded Replica Only)
