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), refusewp_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.
Read tools (enabled by default)
Section titled “Read tools (enabled by default)”emcp-tools/list-tables
Section titled “emcp-tools/list-tables”List all tables in the WordPress database with row counts and sizes. Read-only (manage_options).
emcp-tools/describe-table
Section titled “emcp-tools/describe-table”Return the column definitions and indexes for a table. Read-only (manage_options).
emcp-tools/query
Section titled “emcp-tools/query”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).
Write tools (disabled by default)
Section titled “Write tools (disabled by default)”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.
emcp-tools/insert-row
Section titled “emcp-tools/insert-row”Insert a row into a table using $wpdb (manage_options).
emcp-tools/update-rows
Section titled “emcp-tools/update-rows”Update rows matching a forced non-empty WHERE clause; captures a before-image (manage_options).
emcp-tools/delete-rows
Section titled “emcp-tools/delete-rows”Delete rows matching a forced non-empty WHERE clause. Requires an explicit confirm:true; captures a before-image (manage_options).
Enabling the write tools
Section titled “Enabling the write tools”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.