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 any secret stored as a plain file in the tree — the read-protected list below (v3.14.1) covers the common cases, but a site-specific secrets file outside it is still readable unless you add it via the filter. 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. Refuses a read-protected path (a protected_read error) — see below. 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. Silently omits matches inside a read-protected path rather than erroring, same list as read-file. Read-only (manage_options).
Read-protected paths (v3.14.1)
Section titled “Read-protected paths (v3.14.1)”read-file/search-files refuse, by basename: wp-config.php, wp-config-local.php (Bedrock and several hosting stacks), .env (Bedrock, Docker, containerized setups), .htpasswd, auth.json (Composer HTTP-basic tokens), .netrc, id_rsa, id_ed25519 — plus two pattern rules: any wp-config.*/wp-config-* variant (catches wp-config.php.bak, .save, .old, editor swap files) and anything inside a .git directory (a remote URL there can carry an embedded token). All paths are resolved to their real, symlinked target before the check runs, so a symlink pointing at a protected file is refused the same as the file itself — and can’t be used to read outside ABSPATH either. Filterable via emcp_tools_fs_read_protected_paths.
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 (a broader list than the read tools above, which only refuse wp-config.php — write-side protection is filterable via emcp_tools_fs_protected_paths, a separate filter from the read-side one), 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.