
Powerful all-in-one Cloudflare cache solution for WordPress: edge HTML caching, automatic purging, advanced admin controls, API token support, and comprehensive logging.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Cloudflare Smart Cache is a powerful WordPress plugin that integrates advanced Cloudflare edge caching and automatic purging. It provides:
- Edge HTML caching for public pages
- Automatic cache purging on post, category, and term changes
- Admin controls for manual purging and cache status
- API token authentication for secure Cloudflare API access
- Comprehensive logging and error handling
- Rate limiting and batch processing for API requests
- Multi post type support and developer hooks
To use Cloudflare Smart Cache, you need a WordPress site and a Cloudflare account with an API token.
- WordPress 5.0 or higher
- PHP 7.4 or higher
- Cloudflare account and API token
- Download or clone the plugin:
git clone https://github.com/LoveDoLove/cloudflare-smart-cache.git
- Upload the
plugins/cf-smart-cache.php
and related files to your WordPresswp-content/plugins/
directory. - Activate the plugin in the WordPress admin dashboard.
- Go to Settings > CF Smart Cache and enter your Cloudflare API token and select your zone.
- Save settings and use the admin controls to manage cache.
After activation and configuration:
- The plugin will automatically purge Cloudflare cache when posts, categories, or terms are updated or deleted.
- Use the admin page to manually purge all cache or just the homepage.
- View cache status and recent API activity in the admin UI.
- Advanced users can use developer hooks for custom cache logic.
For more details, see the code and admin UI.
Contributions are welcome! Please fork the repo and submit a pull request, or open an issue for suggestions and bug reports.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
LoveDoLove - @LoveDoLove
Project Link: https://github.com/LoveDoLove/cloudflare-smart-cache