You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package now supports SQLite databases in addition to MySQL/MariaDB. When using the [SQLite Database Integration plugin](https://github.com/WordPress/sqlite-database-integration/), most `wp db` commands will automatically detect and work with SQLite databases.
13
-
14
-
**Supported commands with SQLite:**
15
-
-`wp db create` - Creates the SQLite database file
16
-
-`wp db drop` - Deletes the SQLite database file
17
-
-`wp db reset` - Recreates the SQLite database file
18
-
-`wp db query` - Executes SQL queries via PDO
19
-
-`wp db export` - Exports the SQLite database to SQL
20
-
-`wp db import` - Imports SQL into the SQLite database
21
-
-`wp db tables` - Lists tables (via $wpdb)
22
-
-`wp db size` - Shows database file size
23
-
-`wp db prefix` - Shows table prefix (via $wpdb)
24
-
-`wp db columns` - Shows column information (via $wpdb)
25
-
-`wp db search` - Searches database content (via $wpdb)
26
-
-`wp db clean` - Removes tables with prefix (via $wpdb)
27
-
28
-
**Commands not applicable to SQLite:**
29
-
-`wp db check` - Shows a warning (SQLite doesn't require manual checking)
30
-
-`wp db optimize` - Shows a warning (SQLite auto-optimizes with VACUUM)
31
-
-`wp db repair` - Shows a warning (SQLite doesn't require manual repair)
32
-
-`wp db cli` - Shows a warning (use `wp db query` instead)
33
-
34
-
**SQLite Detection:**
35
-
36
-
The command automatically detects SQLite databases when:
37
-
1. The `DB_ENGINE` constant is set to `'sqlite'` in wp-config.php
38
-
2. The `SQLITE_DB_DROPIN_VERSION` constant is defined (plugin loaded)
39
-
3. A `db.php` drop-in exists with SQLite integration
40
-
41
-
**Database File Location:**
42
-
43
-
By default, the SQLite database is expected at `wp-content/database/.ht.sqlite`. You can customize this location using:
44
-
-`FQDB` constant - Full path to the database file
45
-
-`FQDBDIR` constant - Directory containing the database
46
-
-`DB_FILE` constant - Database filename (used with FQDBDIR)
0 commit comments