Version 1.3
Integrate AWS CloudFront with your WordPress site for faster asset delivery and improved performance. This lightweight plugin lets you selectively serve images, scripts, styles, and plugins through your CloudFront distribution. It also offers on-demand cache purging with customizable invalidation paths and ensures that your admin pages remain unaffected.
Features
- CloudFront URL Rewriting:
Automatically rewrites asset URLs (images, scripts, styles, and plugins) to point to your CloudFront distribution for faster delivery. - Selective Asset Serving:
Choose which assets are served via CloudFront using simple checkbox options in the settings. - Cache Purging:
Easily purge your CloudFront cache with a click. Customize invalidation paths to limit cache purging to specific assets. - Admin Exclusion:
Ensures that pages in the WordPress admin dashboard remain unaffected by CDN rewriting for stability. - CORS Headers:
Adds appropriate CORS headers to help avoid opaque response blocking issues on frontend pages. - Performance Optimizations:
Improved URL rewriting performance by caching the home URL and reducing unnecessary processing.
Installation
- Download the Plugin:
Click the download button below to get the latest ZIP file. - Upload to WordPress:
- In your WordPress dashboard, go to Plugins > Add New.
- Click Upload Plugin, choose the ZIP file you downloaded, and click Install Now.
- After installation, click Activate.
- Configure the Plugin:
- Navigate to Settings > CloudFront CDN.
- Enter your CloudFront distribution domain, AWS credentials, and distribution ID.
- Select which assets you want to serve via CloudFront.
- Optionally, specify custom invalidation paths (comma-separated) to control cache purging.
- Save your changes.
- Use the Cache Purging Feature:
Use the “Purge CloudFront Cache” button on the settings page whenever you need to clear cached content.
Requirements
- AWS CloudFront Distribution:
You must have a CloudFront distribution set up with your site’s assets. - AWS SDK for PHP:
The plugin relies on the AWS SDK for PHP for cache purging. Ensure it is installed (via Composer or manually included). - WordPress Version:
Compatible with WordPress 5.0 and later.
Download
Download AWS CloudFront CDN Support Plugin (ZIP)
Changelog
Version 1.3
- Added custom invalidation paths option
- Optimized URL rewriting with cached home URL
- Fixed duplicate ID issues in settings
- Performance and usability improvements
License
This plugin is released under the GPLv2 or later.