跳转到主要内容

Remediation

Wordfence CLI, as of version 3.0.1, comes with a new subcommand, wordfence remediate, to automatically repair known files belonging to a WordPress installation. Any file part of all versions of WordPress core, as well as all versions of plugins and themes available for download on wordpress.org can be automatically downloaded to restore a file infected with malware.

To see remediate in action, visit the examples page.

Remediate Command Line Arguments

General Options:

  • -c, --configuration: Path to a configuration INI file to use. (default: ~/.config/wordfence/wordfence-cli.ini)
  • -l, --license: Specify the license to use.
  • --version: Display the version of Wordfence CLI.
  • -h, --help: Display help information.
  • --accept-terms: Automatically accept the terms required to invoke the specified command.
  • --read-stdin: Read paths from stdin. If not specified, paths will automatically be read from stdin when input is not from a TTY. (use --no-read-stdin to disable)
  • -s, --path-separator: Separator used to delimit paths when reading from stdin. Defaults to the null byte.

Output Control:

  • --banner: Display the Wordfence banner in command output when running in a TTY/terminal. (use --no-banner to disable)
  • --color: Enable ANSI escape sequences in output.
  • --output: Write results to stdout. This is the default behavior when --output-path is not specified. (use --no-output to disable)
  • --output-path: Path to which to write results.
  • --output-columns: An ordered, comma-delimited list of columns to include in the output. Available columns: path, type, site, target_path, wordpress_version, extension_slug, extension_name, extension_version. Compatible formats: csv, tsv, null-delimited, line-delimited. (default: all)
  • -m, --output-format: Output format used for result data. Options: csv, tsv, null-delimited, line-delimited, human. (default: human)
  • --output-headers: Include column headers in output. Compatible formats: csv, tsv, null-delimited, line-delimited. (use --no-output-headers to disable)
  • -u, --output-unremediated: Only include unremediated paths in the output.