Recently, I changed the website server and started using Tencent's EdgeOne service. Since I had to manually clear the cache in the EdgeOne backend every time I updated an article, I wondered if I could write a plugin to achieve automatic refresh. Thus, this Tencent EdgeOne Cache Purger WordPress Plugin was born.
Introduction to Tencent EdgeOne Cache Purge WordPress Plugin
A WordPress plugin that automatically refreshes Tencent Cloud EdgeOne cache after a post is published, updated, or deleted.
Features
- Automatic Cache Refresh: Automatically refreshes cache when posts are published, updated, or deleted.
- Supports Multiple Post Types: Post, Page, Custom Post Type
- Smart Refresh: Automatically refreshes the article page, homepage, category page, tag page, author page, and date archive page.
- Comment Integration: Automatically refreshes the cache of related articles when new comments are approved.
- Manual Refresh: Supports manually refreshing specific articles or the entire site.
- Refresh Method Optional: Supports deleting cache (delete) or marking it as expired (invalidate).
- Logging: Optionally logs refresh operation records.
- No SDK Required: Supports directly calling the API without installing the Tencent Cloud SDK.
Introduction to Tencent EdgeOne
Edge Security Acceleration Platform EO (TencentCloud EdgeOne) is based on Tencent Cloud's global edge nodes, providing integrated edge services such as domain name resolution, dynamic/static intelligent acceleration, TCP/UDP Layer 4 acceleration, DDoS/CC/Web/Bot protection, Pages, and edge function computing. It helps customers respond to user requests faster, more securely, and more flexibly.
Usage Tutorial
1. Apply for and use the EdgeOne service
As of the publication of this article, EdgeOne still has a free tier available to claim.

International Version Claim Address:Speed Test Sharing, Unlock More EdgeOne Free Tiers
Domestic Version Claim Address:Edge Security Acceleration Platform Special Offer_EdgeOne Promotional Activities - Tencent Cloud

After successfully claiming, go to bind the domain name you want to connect. It supports both CNAME and NS connection methods, which is relatively simple.

Among them, the Global Availability Zone can only be selected after filing and real-name verification. Websites without filing can only select the Global Availability Zone (excluding Mainland China).
2. Install the EdgeOne Cache Purge Plugin
- Download the plugin zip file
- Log in to the WordPress Admin Dashboard
- Go to 「Plugins」 → 「Add New」 → 「Upload Plugin」
- Select the plugin zip file and upload it
- Activate the plugin
PS: The plugin has passed the official WordPress review and can be installed directly by searching for „Cache Purger for EdgeOne“ in the WP Admin plugins section.
3. Configure the EdgeOne Cache Purge Plugin
在Admin Menu,SettingsBelow, you can findEdgeOne Cache PurgeSettings entry.

First, go to the Tencent Cloud console to apply forSecret ID和Secret Key. You can directly fill them in here, or define them in the wp-config.php file.
Then fill in theZone ID, check the box forEnable Automatic Purge, save the settings, and the configuration is complete.

In the manual purge interface, you can purge by Post ID or by URL.

After purging, you can view the records in the purge log.
Explanation about cache plugin integration
Currently, the plugin integrates automatic purge functionality for four caching plugins: WP Super Cache, W3 Total Cache, WP Rocket, and LiteSpeed Cache. When you purge the cache in your caching plugin, the EdgeOne plugin will automatically purge the CDN cache.
However, Naibabiji's own website usesNginx FastCGI Cache. Only W3 Total Cache has been tested with a friend. If your caching plugin's purge does not automatically clear the CDN cache, please manually purge once in the EdgeOne cache plugin.

Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.