A full database manager, right inside wp-admin
Database Manager lets you browse tables, inspect structure, run raw SQL, design relationships and export backups, all without phpMyAdmin or shell access.
- Browse, structure and query every table in the database.
- A visual Designer for viewing and editing foreign key relationships.
- One-click export for a single table or a full database backup.
- Write queries stay off by default, until you explicitly enable them.
What does Database Manager do?
When the database_manager module is active, TOWP_Database_Manager adds a dedicated admin screen that lists every table in the site's database with its row count and size, and lets an administrator browse rows, inspect column structure and indexes, run raw SQL, create or rename tables and columns, and design foreign key relationships visually. Read-only queries, SELECT, SHOW, DESCRIBE and EXPLAIN, run immediately; anything that modifies data or schema stays blocked unless a separate "Allow write queries" setting is turned on, and every raw SQL execution, successful or not, gets recorded in TheOneWP's audit log.
Some questions only the database itself can answer
Direct database access is exactly what some questions need, and exactly what makes a wrong query genuinely dangerous.
Not every host offers phpMyAdmin or shell access
Answering exactly what a plugin wrote, why a query is slow, or what's left behind after something was deleted sometimes means direct database access that a hosting plan simply doesn't include.
A wrong query is genuinely dangerous
Direct database access is powerful precisely because nothing stops a destructive query from running immediately, which makes an accidental DROP or an UPDATE without a WHERE clause a real risk.
Full access, with a deliberate safety gate
The module puts real database administration inside wp-admin, but keeps anything destructive behind a setting that has to be turned on first.
Browse, structure and query every table
See every table's rows and structure, and run SELECT queries immediately, without any extra setup.
Write queries are off until you turn them on
INSERT, UPDATE, DELETE, ALTER and every other modifying statement stay blocked until "Allow write queries" is explicitly enabled in settings.
Export a table, or the whole database
Generate a SQL dump of a single table, or a full backup of every table, directly from the same screen.
Real database administration, with real guardrails
Every capability below is present in the supplied PHP class, its AJAX handlers and settings registration.
Every table, with size and row count
A single screen lists every table in the database, pulled live from information_schema, with its size and row count.
Searchable, sortable, paginated rows
Browse any table's data with search across every column, column sorting, and 25 rows per page.
A real query console
Run any SQL statement, with automatic detection of read-only versus write queries, including inside CTEs.
Create, alter and rename
Create tables, add or drop columns, modify column definitions, rename tables and reset AUTO_INCREMENT values, all from the interface.
A visual relationship builder
See and edit foreign key relationships between tables visually, with the layout saved for next time.
Single-table or full database dumps
Export any one table as SQL, or back up every table in the database at once, both from the same screen.
Where direct database access helps most
The module supports the moments no ordinary WordPress screen can answer.
Hosts without phpMyAdmin or shell access
Get full database administration on hosting plans that don't offer either, without installing a separate tool.
Debugging a plugin's stored data
Look directly at what a plugin actually wrote to the database, when its own admin screens don't show enough detail.
Quick exports before a risky change
Pull a single table's data, or a full backup, right before running a migration or a bulk update.
Power that stays accountable
The module combines real database access with logging and a deliberate gate against accidental damage.
Bounded results, parameterized queries
The verified implementation guards against runaway results and unsafe query construction.
Bounded result sets
SELECT queries without an explicit LIMIT are automatically capped at 100,000 rows, preventing a runaway query from exhausting PHP's memory.
Prepared queries wherever values are involved
Search, pagination and row operations all use $wpdb->prepare(), keeping every value-based query parameterized.
Live stats pulled once per page load
Table sizes and row counts come from a single information_schema query rather than scanning each table individually.
A gate for writes, a record of everything
The code restricts access tightly and separates the ability to read from the ability to write.
Administrator-only, nonce-verified access
Every AJAX action requires both the manage_options capability and a verified towp_db_nonce before doing anything.
Write queries require a separate, explicit setting
Any statement beyond SELECT, SHOW, DESCRIBE or EXPLAIN stays blocked unless "Allow write queries" has been turned on deliberately.
Table and column names are validated against the live schema
A submitted table name gets checked against the database's actual table list before use, preventing a crafted name from reaching a query.
Every raw SQL execution is logged
Successful and failed queries alike get written to the audit log with the statement type and text, creating a record of what ran and when.
Built around native MySQL and WordPress APIs
The supplied code integrates through APIs present in WordPress core and MySQL itself. No compatibility claim beyond the verified implementation is assumed.
information_schema
Table statistics and structure come from MySQL's own information_schema, the same source phpMyAdmin and similar tools use.
$wpdb
All database access runs through WordPress's own $wpdb object, the same database layer every other part of WordPress uses.
TheOneWP Audit Log
Raw SQL execution integrates with the plugin's own audit log system, recording the operation, type and outcome.
TheOneWP versus common alternatives
Compare the verified Database Manager implementation with phpMyAdmin or direct shell access.
| Capability | TheOneWP Database Manager | Other common solutions |
|---|---|---|
| Table browsing and structure | Built into wp-admin, no extra tool needed | Usually requires phpMyAdmin or shell access |
| Raw SQL console | Read/write detection with a dedicated write-query gate | phpMyAdmin runs any query immediately, with no equivalent gate |
| Visual relationship designer | Foreign keys viewable and editable visually | Rarely available outside a dedicated database tool |
| Query logging | Every raw SQL execution recorded in an audit log | phpMyAdmin's query log, if enabled at all, lives outside WordPress |
| Administration | One screen inside the same admin as everything else | A separate login, tool, or hosting feature entirely |
Work with the database safely in four steps
Keep write access closed until a specific task genuinely needs it.
Enable Database Manager
Activate the module from the TheOneWP Utility settings tab.
Browse and inspect tables
Open the table list, browse rows or view structure for any table, all without needing write access enabled.
Enable write queries only when needed
Turn on "Allow write queries" specifically when a task actually requires modifying data or schema, then consider turning it back off.
Export before anything risky
Pull a table export or a full backup before running a migration, bulk edit, or any other change that's hard to undo.
Use real power deliberately
Direct database access rewards a bit of discipline around when write access actually needs to be open.
Leave write queries off by default
Keep the write-query gate closed until a specific task genuinely needs it, then re-close it afterward.
Back up before running a write query
Export the affected table, or the full database, before running anything beyond a SELECT.
Review the audit log after a session of raw SQL
Confirm what actually ran matches what was intended, especially after a session involving several manual queries.
Use the Designer to understand relationships before altering a table
Check what foreign keys reference a table before renaming it or dropping a column it depends on.
Avoid assumptions that put data at risk
The module's power comes with responsibilities that are easy to overlook in a hurry.
Enabling write queries and forgetting to turn them off
Leaving the write-query gate open longer than necessary removes the safety margin it's meant to provide.
Running a query without a WHERE clause
The write-query gate prevents accidental writes when it's off, but an UPDATE or DELETE without a WHERE clause still affects every row once writes are enabled.
Assuming an export is a full backup
A single-table export only covers that table; the separate "Backup" action is what covers the whole database at once.
Database Manager FAQ
These answers come directly from the verified class, its AJAX handlers and settings registration.
What does Database Manager do?
It adds a full database administration screen inside wp-admin: browsing tables, viewing structure, running SQL, designing relationships and exporting backups.
Can I run any SQL statement I want?
Read-only statements, SELECT, SHOW, DESCRIBE and EXPLAIN, run immediately. Anything that modifies data or schema is blocked unless "Allow write queries" is enabled first.
Is every query I run recorded anywhere?
Yes. Every raw SQL execution, successful or failed, gets logged to TheOneWP's audit log with its type and text.
What happens if I try a write query without enabling that setting?
The request is blocked with an explanatory message, and the attempt still gets logged as an error in the audit log.
Is there a limit on how many rows a query can return?
Yes. A SELECT without an explicit LIMIT is automatically capped at 100,000 rows to avoid exhausting PHP's memory.
Can I see how tables relate to each other?
Yes, through the Designer, a visual view of foreign key relationships that can also be used to add or remove them.
Can I export just one table instead of the whole database?
Yes. A single-table export and a full database backup are two separate actions, both available from the same screen.
Who can access Database Manager?
Only users with the manage_options capability, and every action also requires a verified nonce.
Does this replace the need for a separate backup plugin?
The Backup action produces a SQL export of the database, which can serve as a manual backup, though it's a different feature from a dedicated scheduled-backup module.
Can I create a new table from scratch?
Yes, along with adding and dropping columns, modifying column definitions, and renaming existing tables.
Stop waiting on hosting support for database access.Manage it directly from wp-admin.
Use Database Manager to browse, query and export your WordPress database, with write queries safely off until you turn them on.

