Repository navigation
Module: DB Manager
Claude edited this page Oct 23, 2026
·
5 revisions
The DB Manager module provides a web interface for executing SQL queries directly against the database with query history tracking.
This module allows administrators to:
- Execute arbitrary SQL queries against the database
- View query results in a tabular format
- Track query execution history with timing and row count metrics
- Re-run previous queries from history
- Support for SELECT, INSERT, UPDATE, DELETE, PRAGMA, EXPLAIN, and WITH statements
- Tabular display of SELECT query results
- Row count and execution time metrics
- Results capped at 1,000 rows (larger results are flagged as truncated, in the result and in the history) and a 10-second statement timeout reported as "query cancelled after 10s"
- Query history with click-to-reload functionality
- Keyboard shortcut (Ctrl+Enter) for quick execution
Access at Admin > Modules > DB Manager or /admin/dbmanager.
- Enter your SQL query in the textarea
- Click Execute Query or press Ctrl+Enter
- View results below the query form
For SELECT queries, results are displayed in a table. For DML statements, the number of affected rows is shown.
The module maintains a history showing:
| Column | Description |
|---|---|
| Query | The SQL statement (truncated preview) |
| Time | When the query was executed |
| Duration | Execution time in milliseconds |
| Rows | Number of rows returned/affected |
| Status | Success or Failed |
Click any history row to reload that query into the editor.
| Method | Path | Description |
|---|---|---|
| GET | /admin/dbmanager |
Dashboard with query form and history |
| POST | /admin/dbmanager/execute |
Execute a SQL query |
PRAGMA table_info(pages);SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;SELECT COUNT(*) as total FROM pages WHERE status = 'published';SELECT id, title, slug, status, created_at
FROM pages ORDER BY created_at DESC LIMIT 10;- Backup before modifications — Always backup before running UPDATE or DELETE
- Test queries first — Use SELECT to verify WHERE clauses before modifying data
- Use transactions — For complex modifications, wrap in transactions
- Review history — Check query history to audit database operations
- Protected by admin authentication middleware (admin users only)
- CSRF validation on POST requests
- Complete query history logging for audit purposes
- Inactive by default on new installs; enable it from Admin > Modules only while it is needed
- Activating it asks for the administrator's current password (wrong attempts count toward the login lockout); once active, queries need none, so switch it off when done
- Results are capped at 1,000 rows and each statement is cancelled after 10 seconds
- Query execution is refused in demo mode (the history stays visible)
Getting Started
Core Features
- Content Management
- Media Library
- Taxonomy
- Menu Builder
- Forms
- Multi-Language
- SEO
- Feeds
- Video Embedding
- Agent-Ready
Administration
API & Integrations
Security
Theme Development
Module Development
Built-in Modules
- Module: Sentinel
- Module: Developer
- Module: DB Manager
- Module: Migrator
- Module: Informer
- Module: Demo Mode
- Module: Internal Analytics
- Module: External Analytics
- Module: Privacy
- Module: Embed
- Module: MCP Server
Deployment