The Pronamic Cloudflare plugin adds a number of features, such as WP-CLI commands, to the Cloudflare plugin.
This plugin offers advanced configuration options via wp-config.php
constants for integrating with Cloudflare. These settings allow you to securely manage your Cloudflare credentials and zone ID directly from the WordPress configuration file.
To configure these options, add the following constants to your wp-config.php
file:
Your Cloudflare account email address used to authenticate API requests.
define( 'CLOUDFLARE_EMAIL', 'your-email@example.com' );
The Cloudflare API key associated with your account. You can find this in your Cloudflare dashboard under API Tokens.
define( 'CLOUDFLARE_API_KEY', 'your-cloudflare-api-key' );
The Cloudflare Zone ID for the domain you are managing. You can locate this in your Cloudflare dashboard under the Overview tab.
define( 'PRONAMIC_CLOUDFLARE_ZONE_ID', 'your-cloudflare-zone-id' );
It's recommended to keep your API key and zone ID confidential by restricting access to the wp-config.php
file.
For those who have never heard before WP-CLI, here's a brief description extracted from the official website.
WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser.
$ wp pronamic cloudflare zones
$ wp pronamic cloudflare purge $( wp pronamic cloudflare zones )