All scanner file-action endpoints are available since v2.9.3.
GET /scanner/file
Returns the content of a flagged file centred around the suspicious line, providing ±40 lines of context for review.Parameters
The file path relative to
wp-content/. Path traversal outside wp-content/ is blocked.The flagged line number. The response will be centred around this line. Pass
0 or omit to return all lines.Response
The relative path that was read.
Total number of lines in the file.
The flagged line number provided in the request.
DELETE /scanner/file
Permanently deletes a flagged file from disk.Parameters
The file path relative to
wp-content/.Must be
true. This prevents accidental deletions.Response
Always
true on success.The relative path of the deleted file.
POST /scanner/quarantine
Moves a flagged file towp-content/wmp-quarantine/ and appends a .quarantined extension so it cannot be executed. A .htaccess file is written to the quarantine directory to block direct HTTP access.
Quarantined files remain on disk in a protected directory. You can inspect them manually before deciding to delete them permanently.
Parameters
The file path relative to
wp-content/.Must be
true.Response
Always
true on success.The destination path of the quarantined file relative to
wp-content/ (e.g. wmp-quarantine/plugins/my-plugin/bad.php.quarantined).POST /scanner/ignore
Adds a file to the scanner ignore list. Ignored files are skipped on future scans.Parameters
The file path relative to
wp-content/ to ignore.Response
Always
true on success.The path that was added to the ignore list.
GET /scanner/ignored
Returns all file paths currently on the scanner ignore list.Response
Returns an array of relative file path strings (relative towp-content/).
DELETE /scanner/ignored
Removes a file from the scanner ignore list. The file will be included in future scans.Parameters
The file path to remove from the ignore list.
Response
Always
true on success.