WP Manifestindependent plugin directory
manifest / performance / wack-cloudfront-invalidation

WACK CloudFront Invalidation WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

WACK CloudFront Invalidation is a WordPress plugin that helps you to run invalidation on CloudFront after a post is published or updated.

★ 0stars
946composer installs
v0.2.2latest · 7mo ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/kodansha/wack-cloudfront-invalidation/archive/refs/heads/main.zip

On Packagist as kodansha/wack-cloudfront-invalidation:

composer require kodansha/wack-cloudfront-invalidation
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WACK CloudFront Invalidation is a WordPress plugin that helps you to run invalidation on CloudFront after a post is published or updated.

It is designed to work with the WACK Stack, but can be used with any WordPress installation that uses CloudFront as a CDN.

How it works

This plugin triggers invalidation for published content updates by using:

  • save_post
  • rest_after_insert_{post_type} (for post and public custom post types)

It skips autosaves, revisions, and unpublished states such as draft and auto-draft.

Installation

  • Requires PHP 8.2 or later
  • Requires WordPress 6.7 or later
  • Requires Composer

Using Composer

composer require kodansha/wack-cloudfront-invalidation

[!NOTE] This plugin is not available on the WordPress.org plugin repository. The only installation method currently available is through Composer.

Configuration

AWS credentials

WACK CloudFront Invalidation uses AWS SDK for PHP to send invalidation requests to CloudFront, so you need to configure AWS credentials. Please refer to the AWS SDK for PHP documentation for more information on how to set up credentials.

CloudFront Distribution ID

You can configure a CloudFront Distribution ID in either of the following ways:

  1. Set WACK_CF_INV_DISTRIBUTION_ID in wp-config.php (or equivalent)
  2. Enter it in the plugin settings page (WACK Stack > WACK CF Inv)
define('WACK_CF_INV_DISTRIBUTION_ID', 'YOUR_CLOUDFRONT_DISTRIBUTION_ID');

[!IMPORTANT] If WACK_CF_INV_DISTRIBUTION_ID is defined, it takes precedence over the value stored in the database.

[!NOTE] This plugin supports only one CloudFront Distribution ID.

Invalidation Path Settings

After installing the WACK CloudFront Invalidation plugin, a settings page is added to the WordPress admin menu under WACK Stack > WACK CF Inv.

In this settings page, you can configure CloudFront invalidation paths for each post type.

[!IMPORTANT] To specify multiple paths, list them separated by line breaks. Empty lines will be ignored.

You can use the following placeholders in each path:

  • %id%: Replaced with the post ID
  • %slug%: Replaced with the post slug (falls back to post ID when slug is empty)

wack_cf_inv_{post_type}_paths filter

This plugin allows you to customize the CloudFront invalidation paths per post type using a filter.

The following filter is applied before issuing a CloudFront invalidation:

$paths = apply_filters('wack_cf_inv_' . $post->post_type . '_paths', $paths, $post);
  • {post_type}: Replace with your custom post type (e.g., post, news, etc.).
  • $paths: Array of paths determined by the post type and the plugin settings.
  • $post: The WP_Post object being processed.

Example

To add the homepage (/) to the invalidation paths for the post post type, add the following to your theme’s functions.php or a custom plugin:

add_filter('wack_cf_inv_post_paths', function($paths, $post) {
    $paths[] = '/';
    return $paths;
}, 10, 2);

This filter allows you to modify or extend the list of paths to be invalidated for each post type, providing flexible cache control.

[!TIP] If you want to modify or extend the list of paths for the news post type, use wack_cf_inv_news_paths instead of wack_cf_inv_post_paths.

Tips

WACK_CF_INV_DRY_RUN constant

Dry Run can be configured either by constant (WACK_CF_INV_DRY_RUN) or from the plugin settings page.

When WACK_CF_INV_DRY_RUN is defined, its value takes precedence over the database setting.

If Dry Run is enabled, the actual CloudFront invalidation execution will be skipped, and only log output will be performed.

You can use this for testing behavior in development environments.

WACK Log integration

If you have the WACK Log plugin installed, various logs from WACK CloudFront Invalidation will be output to standard output using WACK Log.

Releases

9 releases.

Tag
Published
v0.2.2 latest
Feb 26, 2026 7mo ago
Feb 26, 2026 7mo ago
Feb 17, 2026 8mo ago
Feb 12, 2026 8mo ago
Feb 12, 2026 8mo ago
Apr 30, 2025 1 year ago
Apr 28, 2025 1 year ago
Apr 15, 2025 1 year ago
Apr 14, 2025 1 year ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

WACK CloudFront Invalidation 0.2.0 · audited by WP Registry

No security issues found.

Audited release
0.2.0
Findings
none
Worst severity
—
Content hash
53e33aba2c5f4580731418a0…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.