Filesystem
Read and scan any file inside the WordPress installation (core, plugins, themes, uploads) and, when you opt in, modify and delete files. Every path is confined to the WordPress installation (ABSPATH); there is no directory traversal and no symlink escape outside the root.
The 3 read tools are enabled by default. The 3 write/delete tools ship disabled-by-default. An admin opts in per-tool on EMCP Tools → Tools in wp-admin. All six require manage_options.
Risk notice. File read can expose
wp-config.phpand any secret stored as a plain file in the tree. Enabling the write tools is effectively remote code execution. An agent can edit any PHP file WordPress then loads. These tools are confined to ABSPATH, ship disabled-by-default, are admin-gated, auto-back-up every file before writing, and audit-log every mutation. Arbitrary filesystem 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/read-file
Section titled “emcp-tools/read-file”Return the contents of any file inside ABSPATH. Read-only (manage_options).
emcp-tools/list-directory
Section titled “emcp-tools/list-directory”List the entries in a directory inside ABSPATH: names, types, sizes, modified times. Read-only (manage_options).
emcp-tools/search-files
Section titled “emcp-tools/search-files”Search for files matching a name pattern or containing a string within ABSPATH. Read-only (manage_options).
Write tools (disabled by default)
Section titled “Write tools (disabled by default)”Every write/delete tool: confines the path to ABSPATH, auto-backs up the original first, refuses wp-config.php and .htaccess, requires the edit_files capability (honoring DISALLOW_FILE_EDIT), and records the change to an audit log.
emcp-tools/write-file
Section titled “emcp-tools/write-file”Write (create or overwrite) a file inside ABSPATH (edit_files + manage_options).
emcp-tools/edit-file
Section titled “emcp-tools/edit-file”Apply a targeted find-and-replace or line-range edit to a file inside ABSPATH (edit_files + manage_options).
emcp-tools/delete-file
Section titled “emcp-tools/delete-file”Delete a file inside ABSPATH. Requires an explicit confirm:true (edit_files + manage_options).
Enabling the write tools
Section titled “Enabling the write tools”write-file, edit-file, and delete-file are off until you enable them. Open EMCP Tools → Tools in wp-admin, find the Filesystem category on the WordPress tab, and toggle the ones you want. See Disabling tools.