Skip to content

Database

Inspect the WordPress database with flexible read-only SQL, and, when you opt in, perform structured, parameterized writes. The 3 read tools are enabled by default; the 3 write tools ship disabled-by-default (an admin opts in on EMCP Tools → Tools). All six require manage_options.

Direct DB access. The read path (query) is bounded by a read-only-SQL validator that rejects writes, DDL, stacked statements, MySQL /*! … */ executable comments, and file-access SQL (INTO OUTFILE / LOAD_FILE). Writes are structured and parameterized via $wpdb (no raw write-SQL, so no DDL), refuse wp_users/wp_usermeta, force a non-empty WHERE on update/delete, and snapshot a before-image to an audit log. Arbitrary DB access is contrary to WordPress.org plugin guidelines; this feature exists per an explicit project decision and stays off unless you enable it.

List all tables in the WordPress database with row counts and sizes. Read-only (manage_options).

Return the column definitions and indexes for a table. Read-only (manage_options).

Run a read-only SQL query: SELECT / SHOW / DESCRIBE / EXPLAIN only; results are capped. Writes, DDL, stacked statements, /*! executable comments, and file-access SQL are rejected. Read-only (manage_options).

Every write tool uses $wpdb with parameterized values (no raw write-SQL or DDL), refuses wp_users/wp_usermeta, and records a before-image snapshot to an audit log.

Insert a row into a table using $wpdb (manage_options).

Update rows matching a forced non-empty WHERE clause; captures a before-image (manage_options).

Delete rows matching a forced non-empty WHERE clause. Requires an explicit confirm:true; captures a before-image (manage_options).

insert-row, update-rows, and delete-rows are off until you enable them. Open EMCP Tools → Tools in wp-admin, find the Database category on the WordPress tab, and toggle the ones you want. See Disabling tools.