Linux 软件免费装
Banner图

ByteCoreStack - Lightsail CDN Cache Manager

开发者 bytecorestack
stephen97
更新时间 2026年10月26日 19:47
PHP版本: 7.2 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

cdn cache clear lightsail cache manager aws lightsail

下载

1.3.0 1.2.0 1.0 1.0.0 1.1.0

详情介绍:

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: Key Features Manual Cache Clearing Perfect For Requirements Documentation Full setup instructions and documentation available at https://bytecorestack.com/plugins/lightsail-manager

安装:

From WordPress Admin
  1. Go to Plugins > Add New
  2. Search for "ByteCoreStack - Lightsail CDN Cache Manager"
  3. Click "Install Now" and then "Activate"
  4. Configure your AWS credentials in wp-config.php
  5. Go to Settings > Lightsail Manager to manage your cache
Manual Installation
  1. Download the plugin ZIP file
  2. Upload to /wp-content/plugins/ directory
  3. Extract the ZIP file
  4. Activate the plugin through WordPress admin
  5. Open Settings → Lightsail Manager and connect your distribution (see Configuration section)
Configuration Open Settings → Lightsail Manager → Settings, enter your access key ID, secret access key and distribution name, then click Save & test connection. Prefer to keep keys out of the database? Add these constants to your wp-config.php file instead. Anything defined there overrides the matching field on the Settings tab: define('AWS_ACCESS_KEY_ID', 'your_access_key_here'); define('AWS_SECRET_ACCESS_KEY', 'your_secret_key_here'); define('LIGHTSAIL_DISTRIBUTION_NAME', 'your_distribution_name'); Lightsail distributions are managed from the us-east-1 region, which the plugin always uses — AWS only serves domain and distribution APIs from us-east-1, so this is not configurable. A site-wide AWS_DEFAULT_REGION constant set for another AWS integration (such as an S3 offload plugin) does not affect this plugin. 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:
  4. Go to AWS IAM console
  5. Create a new user or use existing one
  6. Attach Lightsail permissions
  7. Generate access keys
  8. Paste the keys into the plugin's Settings tab (or add them to wp-config.php)

屏幕截图:

  • Settings: connection, auto-clear, schedule and monthly report on one page
  • Activity: history of every cache clear

升级注意事项:

1.3.0 Redesigned, simpler admin with a monthly report email, Site Health integration, and the option to enter AWS keys in Settings. Your existing wp-config.php keys, settings and schedule keep working with no changes. 1.2.0 First update since 1.1.0. Adds granular auto-clear triggers with batching, a local Activity Log, and WP-CLI support. Your existing settings are unaffected; the new activity-log table and capability grant are created automatically on the next admin page load. 1.1.0 The plugin has been renamed to "Lightsail CDN Cache Manager". Your settings, schedule, and AWS configuration are unaffected — only the display name changed. This release also adds a "Test Connection" button. 1.0 Initial release.

常见问题:

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 (the exact actions are listed under "Permissions needed" on the Settings tab: lightsail:GetDistributions and lightsail:ResetDistributionCache).

How do I know if my AWS credentials are set up correctly?

Click "Save & test connection" on the Settings 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 authentication. If you enter your keys on the Settings tab, the secret key is stored encrypted, is not loaded on every page request, and is never displayed again. If you define the keys in wp-config.php instead, nothing is stored in the database at all. Use an IAM user limited to the two Lightsail actions listed on the Settings tab.

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. Choose Every hour, Every 6 hours, Every day or Every week on the Settings tab. Daily and weekly clears run at the time you pick, in your site's timezone.

What happens if cache clearing fails?

The plugin shows a plain-language message about what went wrong and records it in the Activity tab. If you turn on the monthly report, it also appears in next month's summary email. Common causes are a mistyped key or distribution name — "Save & test connection" finds these before they matter.

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 ResetDistributionCache action 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 kept for 90 days, after which older entries are pruned automatically.

Can I trigger a cache clear from the command line or a CI/CD pipeline?

Yes. Run wp bcs-lsm flush to 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 ResetDistributionCache call, 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 ResetDistributionCache API 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.

更新日志:

1.3.0 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. 1.1.0 1.0