https://github.com/pronamic/wp-pronamic-cloudflare
The Pronamic Cloudflare plugin adds a number of features, such as WP-CLI commands, to the Cloudflare plugin.
https://github.com/pronamic/wp-pronamic-cloudflare
cache caching cloudflare flush purge siteground wordpress wordpress-plugin wp-cli wp-cli-command
Last synced: 7 months ago
JSON representation
The Pronamic Cloudflare plugin adds a number of features, such as WP-CLI commands, to the Cloudflare plugin.
- Host: GitHub
- URL: https://github.com/pronamic/wp-pronamic-cloudflare
- Owner: pronamic
- Created: 2022-11-15T09:02:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-27T09:51:29.000Z (8 months ago)
- Last Synced: 2025-05-27T10:21:12.511Z (8 months ago)
- Topics: cache, caching, cloudflare, flush, purge, siteground, wordpress, wordpress-plugin, wp-cli, wp-cli-command
- Language: PHP
- Homepage: https://www.pronamic.eu/plugins/pronamic-cloudflare/
- Size: 108 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Pronamic Cloudflare
The Pronamic Cloudflare plugin adds a number of features, such as WP-CLI commands, to the Cloudflare plugin.
## Table of contents
- [Configuration](#configuration)
- [WP-CLI](#wp-cli)
- [Links](#links)
## Configuration
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:
### `CLOUDFLARE_EMAIL`
Your Cloudflare account email address used to authenticate API requests.
```php
define( 'CLOUDFLARE_EMAIL', 'your-email@example.com' );
```
### `CLOUDFLARE_API_KEY`
The Cloudflare API key associated with your account. You can find this in your Cloudflare dashboard under **API Tokens**.
```php
define( 'CLOUDFLARE_API_KEY', 'your-cloudflare-api-key' );
```
### `PRONAMIC_CLOUDFLARE_ZONE_ID`
The Cloudflare Zone ID for the domain you are managing. You can locate this in your Cloudflare dashboard under the **Overview** tab.
```php
define( 'PRONAMIC_CLOUDFLARE_ZONE_ID', 'your-cloudflare-zone-id' );
```
### Security Note
It's recommended to keep your API key and zone ID confidential by restricting access to the `wp-config.php` file.
## WP-CLI
### What is WP-CLI?
For those who have never heard before WP-CLI, here's a brief description extracted from the [official website](https://wp-cli.org/).
> **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.
### Commands
```bash
$ wp pronamic cloudflare zones
```
```bash
$ wp pronamic cloudflare purge $( wp pronamic cloudflare zones )
```
## Links
- https://api.cloudflare.com/#zone-list-zones
- https://api.cloudflare.com/#zone-purge-all-files