Configuration


目录

Configuration can be set through command line arguments, or configured globally through the wordfence-cli.ini file. Once Wordfence CLI is installed, we recommend running wordfence configure to interactively configure Wordfence CLI's global options.

wordfence configure Command Line Arguments

Global Command Line Arguments

These arguments apply to all subcommands.

General Options:

Output Control:

Email:

Logging:

Caching:

wordfence-cli.ini

By default, the configuration file will reside at ~/.config/wordfence/wordfence-cli.ini. This INI file is best suited for global configuration options for Wordfence CLI. The license is the only item that's typically configured here.

Global INI Options

[DEFAULT]
license = <your license key>
verbose = [on|off]
debug = [on|off]
banner = [on|off]
quiet = [on|off]
email = <recipient email address for reports>
email_from = <sender email address for reports>
smtp_host = <hostname of SMTP server for mailing reports>
smtp_port = <port for SMTP server for mailing reports>
smtp_tls_mode = [none|smtps|starttls]
smtp_user = <username>
smtp_password = [on|off]
sendmail_path = <path to sendmail executable, used when SMTP is not configured>
cache_directory = <path to a directory to use for caching>
cache = [on|off]

Subcommand INI Options

See documentation for each subcommand for its respective INI options. Most command line options can also be set in the INI file. Generally, only settings that should be applied every time CLI is invoked should be stored in the config file. For example, don't store options specific to one site being scanned in the global config file. Global options may also be overwritten for each subcommand section.


版本号 #1
由 壳壳虫 创建于 2026-08-29 22:03:38 UTC
由 壳壳虫 更新于 2026-08-29 22:03:38 UTC