User Manual
Turso Client HTTP is a pure-PHP client for libSQL. It talks to Turso Cloud or a self-hosted sqld/libsql-server over Hrana over HTTP. There is no native extension to compile, no FFI, and no php.ini change.
This manual is the source of truth for the package. The GitHub wiki is kept for historical links, but new and updated documentation belongs here.
What this package is
- HTTP client — uses
ext-curlto call the libSQL Hrana v2 pipeline endpoint. - Portable — works on Linux, macOS, Windows, CI runners, and shared hosting where PHP extensions cannot be installed.
- Familiar —
LibSQLprovidesquery(),execute(),executeBatch(),prepare(), andtransaction(). - Batteries included — query builder, schema builder, and Laravel service provider/facade.
What this package is not
- Not the native libSQL PHP extension. For embedded replicas, native sync, or offline-write flavors, use the native extension / native-client packages.
- Not a SQLite file driver. It connects to an HTTP endpoint.
Quick map
| Goal | Start here |
|---|---|
| Install and run first query | Getting Started |
| Configure DSN, env vars, hooks | Configuration |
| Connect to local sqld | Local / sqld |
| Connect to Turso Cloud | Remote / Turso Cloud |
| Fluent SQL builder | Query Builder |
| Create/alter tables | Schema Builder |
| Transactions and batching | Transactions & Pipeline |
| Use in Laravel | Laravel |
| Error behavior | Error Semantics |
| Deploy safely | Production Deployment |
| Common failures | Troubleshooting |
| Class reference | LibSQL, LibSQLResult |