Description
ByteCoreStack – Lightsail CDN Cache Manager is the WordPress plugin built around one job — AWS Lightsail cache clear, done right. If your site, blog, or WooCommerce store runs behind an Amazon Lightsail content delivery network (CDN) distribution, this plugin puts you in full control of that cache directly from wp-admin: a one-click manual cache purge, an automatic cache clear the moment you publish or update content, or a scheduled cache invalidation on a recurring timer — all without ever opening the AWS console.
Search terms like « clear Lightsail cache, » « AWS Lightsail CDN plugin, » « Lightsail cache purge WordPress, » and « Amazon Lightsail cache invalidation » all describe exactly what this plugin does. It’s the missing piece between WordPress and the ResetDistributionCache action on your Lightsail distribution — a dedicated cache management plugin for Lightsail, not a generic multi-CDN tool with Lightsail bolted on as an afterthought.
Use it to manually purge your Lightsail CDN cache with one click, fire an automatic cache clear the instant you publish or update content, or set a scheduled cache clear so your cache invalidates itself on its own — hourly, daily, weekly, monthly, or at custom intervals.
Why Use This Plugin?
If you’ve wished WordPress cache management for Lightsail was as simple as clicking a button, this is it:
- Built specifically for Amazon Lightsail — not a generic CDN plugin awkwardly bolted on; it speaks the Lightsail API directly using AWS Signature Version 4.
- No stale content after publishing — auto-clear on publish/update means visitors never see outdated cached pages.
- Set-and-forget scheduling — interval, weekly, or monthly cache clears with a live countdown so you always know when the next clear runs.
- Credentials never touch the database — AWS keys live in wp-config.php only, never exposed in the admin UI or REST API.
- One-click connection test — verify your AWS Lightsail credentials and distribution name are correct before you ever rely on it.
Key Features
Manual Cache Clearing
* Run a Lightsail cache clear in seconds, right from WordPress admin
* Instant feedback on cache clearing status
* Perfect for when you need immediate control
Automatic Cache Clearing
* Automatically clear CDN cache when content is published, updated, or unpublished
* Also triggers on attachment deletion, taxonomy term edits, nav menu changes, and widget changes
* Select which post types trigger cache clearing, with support for custom post types
* Rapid successive changes are batched into a single deferred clear (fired ~60 seconds later via WP-Cron) instead of one AWS call per save
* Note: Lightsail’s ResetDistributionCache API always resets the entire distribution — there is no per-page/per-path purge
Activity Log
* A local history of every cache clear — manual, automatic, scheduled, and WP-CLI — with timestamp, status, and who/what triggered it
* Stored in your own WordPress database (Lightsail has no live invalidation-history API to pull from, unlike CloudFront)
* Paginated table with a one-click « Clear Log » action
WP-CLI Support
* Trigger a cache clear from the command line or a CI/CD deploy pipeline: wp bcs-lsm flush
* Every CLI-triggered clear is recorded in the Activity Log
Scheduled Cache Clearing
* Set up recurring cache clears on your schedule
* Interval, weekly, or monthly options
* Choose specific times and days
* Live countdown timer showing next scheduled clear
* Uses your WordPress timezone settings
Test Connection
* One-click AWS connection test before you rely on it
* Verifies your access key, secret key, and Lightsail distribution name
* Calls the read-only Lightsail API — never touches your cache
* Clear, specific error messages when something’s misconfigured
Easy Configuration
* Simple wp-config.php based credentials
* Clear status indicators
* Helpful configuration examples
* Secure AWS Signature Version 4 authentication
Perfect For
- WordPress sites and blogs hosted behind an Amazon Lightsail CDN distribution
- Agencies and freelancers managing multiple client sites on AWS Lightsail
- Publishers and news sites that need fresh content delivered fast after every update
- Developers who want automated, hands-off Lightsail cache invalidation
- WooCommerce and membership sites with frequently changing content
- Anyone replacing manual AWS console cache purges with a WordPress-native workflow
Requirements
- An AWS account with an active Amazon Lightsail content delivery network (CDN) distribution
- AWS Access Key ID and Secret Access Key with Lightsail permissions
- WordPress 5.3 or higher
- PHP 7.2 or higher
Documentation
Full setup instructions and documentation available at https://bytecorestack.com/plugins/lightsail-manager
External Services
This plugin connects to the AWS Lightsail API to perform CDN cache invalidation operations.
AWS Lightsail API
This plugin sends requests to the AWS Lightsail REST API endpoint:
https://lightsail.{region}.amazonaws.com/
What data is sent:
- Your Lightsail distribution name (stored locally in wp-config.php)
- A cache reset request signed with your AWS credentials using AWS Signature Version 4
When data is sent:
- When you manually click « Clear CDN Cache Now »
- When a post/page is published or updated (if Auto-Clear is enabled)
- On a recurring schedule (if Scheduled Auto-Clear is enabled)
No personal data, user data, or site content is transmitted to AWS beyond the distribution name and the cache-clear command.
AWS Terms of Service: https://aws.amazon.com/service-terms/
AWS Privacy Policy: https://aws.amazon.com/privacy/
Support
For support, feature requests, or bug reports, please visit:
* Plugin page: https://bytecorestack.com/plugins/lightsail-manager
* Author website: https://bytecorestack.com/
Privacy Policy
This plugin does not collect, store, or transmit any user data. All AWS credentials are stored locally in your wp-config.php file and are only used to communicate with the AWS Lightsail API for cache management operations. See the External Services section above for full details on what is sent to AWS.
Credits
Developed by ByteCore Stack.
License
This plugin is licensed under the GPLv2 or later.
Captures d’écran




Installation
From WordPress Admin
- Go to Plugins > Add New
- Search for « ByteCoreStack – Lightsail CDN Cache Manager »
- Click « Install Now » and then « Activate »
- Configure your AWS credentials in wp-config.php
- Go to Settings > Lightsail Manager to manage your cache
Manual Installation
- Download the plugin ZIP file
- Upload to /wp-content/plugins/ directory
- Extract the ZIP file
- Activate the plugin through WordPress admin
- Configure AWS credentials (see Configuration section)
Configuration
Add these constants to your wp-config.php file:
define('AWS_ACCESS_KEY_ID', 'your_access_key_here');
define('AWS_SECRET_ACCESS_KEY', 'your_secret_key_here');
define('AWS_DEFAULT_REGION', 'us-east-1');
define('LIGHTSAIL_DISTRIBUTION_NAME', 'your_distribution_name');
Finding Your Distribution Name: 1. Log in to AWS Lightsail console 2. Go to Networking > CDN distributions 3. Find your distribution and copy its name
Creating AWS Credentials: 1. Go to AWS IAM console 2. Create a new user or use existing one 3. Attach Lightsail permissions 4. Generate access keys 5. Add keys to wp-config.php
FAQ
-
How do I clear my AWS Lightsail CDN cache from WordPress?
-
Install and activate this plugin, add your AWS credentials to wp-config.php, then go to Settings > Lightsail Manager and click « Clear CDN Cache Now. » No need to log in to the AWS console at all.
-
What is AWS Lightsail CDN?
-
AWS Lightsail CDN is a content delivery network service from Amazon Web Services that caches your website content at edge locations worldwide, making your site faster for visitors globally.
-
Do I need an AWS account?
-
Yes, you need an AWS account with an active Amazon Lightsail distribution and appropriate IAM permissions.
-
How do I get my AWS credentials?
-
You can create AWS credentials (Access Key ID and Secret Access Key) from the AWS IAM console. Make sure the credentials have permissions to manage Lightsail distributions (see the Configuration section above for the exact actions required).
-
How do I know if my AWS credentials are set up correctly?
-
Use the built-in « Test Connection » button on the Configuration tab. It verifies your access key, secret key, and distribution name against the AWS Lightsail API without clearing your cache, and tells you exactly what’s wrong if something fails.
-
Is this plugin secure?
-
Yes, the plugin uses AWS Signature Version 4 for secure authentication. Your credentials are stored in wp-config.php (not in the database) and are never exposed in the admin interface.
-
What’s the difference between Amazon Lightsail and Amazon CloudFront?
-
Amazon Lightsail CDN is the simplified content delivery network bundled with Lightsail distributions, while CloudFront is AWS’s standalone, more advanced CDN. This plugin is built specifically for Lightsail CDN distributions — if you’re using CloudFront instead, you’ll need a CloudFront-specific plugin.
-
Can I automatically clear the cache when I publish or update a post?
-
Yes. Enable Auto-Clear in the plugin and choose which post types (posts, pages, products, or any custom post type) should trigger an automatic cache invalidation whenever they’re published or updated.
-
Can I schedule cache clears at specific times?
-
Yes! The plugin supports interval, weekly, and monthly scheduling with customizable times. You can choose the exact time and day/date for cache clearing, with a live countdown to the next run.
-
What happens if cache clearing fails?
-
The plugin will display an error message with details about what went wrong. Common issues include incorrect credentials or an incorrect distribution name — use « Test Connection » to diagnose this before it happens.
-
Will this slow down my site?
-
No, cache clearing operations happen in the background and don’t affect your site’s performance. The plugin only communicates with AWS when you manually clear cache, when content is updated (if auto-clear is enabled), or during scheduled clears.
-
Does this work with WooCommerce?
-
Yes. WooCommerce registers its products as a custom post type, so you can enable auto-clear for products to keep your storefront’s CDN cache fresh whenever inventory or product details change.
-
Can I clear cache for specific pages only?
-
No — this is an AWS Lightsail API limitation, not a plugin limitation. The
ResetDistributionCacheaction Lightsail exposes has no path/pattern parameter, so every clear (manual, automatic, scheduled, or WP-CLI) always resets the entire distribution. If you need per-path invalidation, that capability exists on Amazon CloudFront, not Lightsail CDN. -
Can I see a history of past cache clears?
-
Yes. The Activity Log tab lists every manual, automatic, scheduled, and WP-CLI cache clear with its timestamp, status, and trigger reason, stored locally in your WordPress database (Lightsail has no live invalidation-history API to pull from). It’s paginated and can be cleared from the same tab.
-
Can I trigger a cache clear from the command line or a CI/CD pipeline?
-
Yes. Run
wp bcs-lsm flushto reset the CDN cache from WP-CLI — useful for firing a cache clear automatically after a deploy. Every CLI-triggered clear is recorded in the Activity Log. -
Does this work with multisite?
-
The plugin is compatible with WordPress multisite installations. Each site can have its own cache clearing schedule.
-
Is this plugin free?
-
Yes. ByteCoreStack – Lightsail CDN Cache Manager is completely free with no premium upsell, no ads, and no artificially limited features — every capability described in this readme (manual clear, auto-clear, scheduling, Activity Log, WP-CLI) is included.
-
Why is my Lightsail CDN still showing an old version of my page?
-
Amazon Lightsail CDN caches content at edge locations, so updates you make in WordPress don’t reach visitors until that cache is reset. This is exactly the problem this plugin solves — enable Auto-Clear so every publish/update automatically triggers a fresh
ResetDistributionCachecall, or click « Clear CDN Cache Now » to purge it immediately. -
What’s the best WordPress plugin to purge Lightsail CDN cache?
-
This plugin exists specifically to answer that question — it’s a purpose-built Lightsail CDN cache manager, not a repurposed CloudFront or generic multi-CDN plugin. It talks directly to the Lightsail
ResetDistributionCacheAPI using AWS Signature Version 4. -
Does this support the WordPress REST API?
-
The plugin’s own admin actions run through WordPress’s authenticated AJAX/REST layer with capability checks, and cache-clear triggers fire correctly for content changes made via the REST API (e.g. from the block editor or headless front ends), not just classic post saves.
Avis
Il n’y a aucun avis sur cette extension.
Contributeurs & développeurs
« ByteCoreStack – Lightsail CDN Cache Manager » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.
ContributeursTraduisez « ByteCoreStack – Lightsail CDN Cache Manager » dans votre langue.
Le développement vous intéresse ?
Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.
Historique des changements
1.2.0
This is the first version published to WordPress.org since 1.1.0. Everything below was built after 1.1.0 and is being released here for the first time — none of it shipped as a separate public update.
- Add automatic invalidation triggers beyond publish/update: unpublish/trash, attachment deletion, taxonomy term edits, nav menu changes, and widget changes
- Add batching: rapid successive auto-clear triggers are merged into a single deferred cache clear (fired ~60 seconds later via WP-Cron) instead of one AWS call per save
- Add a local Activity Log tab recording every manual, automatic, scheduled, and WP-CLI cache clear, with pagination and a « Clear Log » action to reset it (Lightsail has no live invalidation-history API, so this is stored locally, unlike the CloudFront sibling plugin’s live-fetched history)
- Add a custom cache-management capability, replacing the hardcoded manage_options check
- Add WP-CLI support:
wp bcs-lsm flush - Renamed to « ByteCoreStack – Lightsail CDN Cache Manager » — display name only, the plugin slug (
bytepresstech-cdn-manager-for-lightsail) and all your settings are unchanged - Note: Lightsail’s ResetDistributionCache API has no path/pattern parameter — every clear (manual, automatic, scheduled, or CLI) resets the entire distribution; there is no per-page purge
- Fix: the admin UI no longer loads DM Sans/DM Mono from the Google Fonts CDN (
@importinadmin.css); it now uses the system font stack instead, removing an external request that was previously made on every visit to the settings page
1.1.0
- Renamed to « Lightsail CDN Cache Manager » (same plugin, same settings — only the display name changed)
- Add « Test Connection » button in Configuration to verify AWS credentials and the distribution name without clearing the cache
- Migrate legacy option keys from prior plugin name variants (lightsail_*, bptcdnmgr_*, blsm_*) on activation
- Clean up deprecated individual schedule options
- Redesign admin UI: full-width layout, boxed page header, cards split into header/body sections, icon tiles on stat cards
- Fix admin fonts not loading in the dashboard
- Fix mobile/tablet layout issues: square header icon, badge alignment, single-line scrollable tabs, removed unwanted horizontal page scroll
- Fix duplicate checkmark rendering on Auto-Clear post type checkboxes
- Fix plugin text domain to match the plugin slug
- Raise minimum required WordPress version to 5.3 (already required by existing timezone functions)
1.0
- Initial release
- Manual cache clearing functionality
- Automatic cache clearing on content updates
- Scheduled cache clearing (interval, weekly, monthly)
- Live countdown timer for scheduled clears
- Support for custom post types
- Local timezone support for scheduled clears
- Comprehensive AWS error reporting
- Clean, modern admin interface
- Full WordPress coding standards compliance
