Skip to main content Skip to navigation
Free WordPress Plugin

CloudFront cache,
managed in WordPress

CDN Cache Manager for CloudFront gives you complete control over your Amazon CloudFront distribution cache from the WordPress admin. Clear manually, invalidate automatically with smart per-page targeting, or schedule recurring clears β€” no AWS Console required.

100% Free GPL v2 Licensed No Pro Upsell Live on WP.org
100% Free GPL v2 β€” No paid plan
AWS API Signature V4 authenticated
Smart Targeted, not blanket wipes
Live Available on WordPress.org
Features

Everything you need to manage
your CloudFront CDN cache

Purpose-built for CloudFront β€” not a generic CDN plugin with CloudFront bolted on.

Manual Cache Clearing

Purge your entire CloudFront distribution in one click, or invalidate a single URL or path without touching the rest of the cache. Per-user rate limiting protects your invalidation quota from accidental repeat clicks.

Smart Auto-Invalidation

Fires on publish, update, unpublish, trash, and deletion β€” targeting the exact permalink, term archives, post-type archive, and homepage affected, instead of a blanket /* wipe. Falls back to a full invalidation only when a change touches more than 10 paths.

Invalidation Batching

Rapid successive content changes are automatically merged into a single deferred invalidation via WP-Cron instead of firing one CloudFront API call per save β€” protecting your monthly invalidation quota.

Scheduled Cache Clearing

Set up recurring cache clears on a fixed interval (every 5 minutes to 24 hours), on specific days of the week, or on specific dates each month β€” fully timezone-aware, with a live countdown to the next run.

Live Invalidation History

A dedicated tab lists your recent CloudFront invalidations straight from the AWS API β€” expand any entry to see its full path list and status. Nothing is cached or stored locally. Built-in pagination included.

Connection & Permission Diagnostics

"Test Connection" verifies your access key, secret key, and distribution ID against the live CloudFront API. "Check Permissions" tests each required IAM action individually, so a misconfigured policy is diagnosable at a glance.

Secure Credential Handling

AWS credentials are defined as constants in wp-config.php β€” never stored in the database. Running on EC2 with an IAM role attached? Skip static keys entirely; the plugin fetches temporary credentials from the instance metadata service automatically.

WP-CLI Support

Script CloudFront cache purges from the command line for CI/CD deploy pipelines β€” wp bcs-cfm flush all or wp bcs-cfm flush <path>.

Dashboard Widget

A WordPress Dashboard widget summarizing AWS connection status, Auto-Clear and Schedule state, the next scheduled run, and the last time cache was cleared β€” at a glance, without opening the settings page.

Setup

Up and running
in three steps

No SDK. No AWS Console after setup. Just three constants and you're done.

Install & Activate

Search for ByteCoreStack - Cache Invalidation for Amazon CloudFront in the WordPress plugin directory, install, and activate. Or download the ZIP from WordPress.org and upload manually.

Add Credentials to wp-config.php

Add three constants: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and CLOUDFRONT_DISTRIBUTION_ID. Running on an EC2 instance role? Skip the first two β€” only the distribution ID is required.

Manage Your Cache

Go to Settings β†’ CDN Cache Manager. Clear cache manually, enable smart auto-clear, or configure a recurring schedule β€” all from one tab-based admin panel.

FAQ

Common questions

Anything else? Open an issue on the WordPress.org support forum.

What AWS permissions does my IAM user need?

Four CloudFront actions: cloudfront:CreateInvalidation, cloudfront:GetDistribution, cloudfront:ListInvalidations, and cloudfront:GetInvalidation. Create a custom IAM policy with only these four actions for minimal permissions, then use the "Check Permissions" tool to confirm each one is granted.

Where are my AWS credentials stored?

Credentials are defined as PHP constants in wp-config.php β€” they are never written to the database, exposed in the admin UI, or returned by the REST API or AJAX responses. All API calls go directly from your server to AWS; nothing passes through ByteCore Stack servers.

Can I run this without static AWS keys?

Yes, if your WordPress site runs on an EC2 instance with an IAM role attached. Leave AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY undefined, and the plugin automatically fetches temporary credentials from the EC2 instance metadata service. You still need to define CLOUDFRONT_DISTRIBUTION_ID.

Does auto-clear purge my whole site on every change?

No. Auto-clear targets only the specific permalink, taxonomy term archives, post-type archive, and homepage affected by a change. A full distribution invalidation only fires as a fallback when a single change touches more than 10 paths at once.

Can I schedule cache clears at specific times?

Yes. The Schedule tab offers three modes: Interval (every 5 minutes to 24 hours), Weekly (specific days of the week at a set time), and Monthly (specific dates each month at a set time). All times use your WordPress timezone, with a live countdown to the next clear.

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

Use the Test Connection button on the Configuration tab to verify your access key, secret key, and distribution ID against the live CloudFront API. Then use Check Permissions to confirm each required IAM action individually β€” it tells you exactly which one is missing if something fails.

Are there costs to running CloudFront invalidations?

AWS grants 1,000 free path invalidations per month; a full /* invalidation only counts as a single path. Beyond that allowance, standard CloudFront invalidation pricing applies. The plugin's targeted, batched invalidations are designed to make efficient use of this quota.

Is this the same as the Lightsail CDN Cache Manager plugin?

No β€” they're separate plugins for separate AWS services. Lightsail CDN Cache Manager manages an AWS Lightsail CDN distribution's ResetDistributionCache API. This plugin speaks the CloudFront CreateInvalidation API directly and is purpose-built around how CloudFront invalidations actually work.

Will this be free?

Yes β€” always. CDN Cache Manager for CloudFront is 100% free and GPL v2 licensed, with no paid tier, no feature gating, and no upsell β€” consistent with all other ByteCore Stack plugins.

Your CloudFront cache,
under your control

Free, open source, and live on WordPress.org.
Install in seconds β€” no accounts, no subscriptions, no upsell.