=== FrontPup ===
Contributors: painlessanalytics, amandato
Donate link: https://www.painlessanalytics.com/frontpup-cloudfront-wordpress-plugin/
Tags: cloudfront, aws, cdn, amazon, lightsail
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 1.2
Requires PHP: 8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Your AWS CloudFront companion. Clear cache and optimize your CloudFront distribution for your WordPress website

== Description ==

Welcome to FrontPup, your CloudFront companion.

FrontPup allows you to maximize your WordPress website using the AWS CloudFront Content Delivery Network (CDN).

== REQUIREMENTS ==

You __must__ be using the Amazon Web Services (AWS) [CloudFront](https://aws.amazon.com/cloudfront/) service to utilize this plugin.

== FrontPup Features ==

* Non-intrusive Clear Cache (new) admin bar menu option, now you can clear the cache in any view without impacting other work.
* Clear CloudFront Cache (creates an Invalidation request)
* Set no-cache headers for all pages (great for development or testing)
* Set public and private Cache-Control headers for caching in CloudFront and Browsers
* Set separate max-age (browser) and s-maxage (CloudFront) cache duration values

=== Non-intrusive Clear Cache (new) ===
The Non-intrusive Clear Cache admin bar menu option can clear your cache in any view without causing any disruption to your work. The *Clear CloudFront Cache* option is found under the "FrontPup" menu. Requests are performed behind the scenes. The returned status is added to the menu bar as an italics message in the menu. Feedback is reported with the icon to the left of the FrontPup menu option.

== Turbocharge your WordPress Website with CloudFront ==
Using Amazon CloudFront in front of your WordPress website offers significant benefits by improving performance, security, and scalability. CloudFront is a Delivery Network (CDN) with over 750+ Points of Presence (PoPs) around the world plus over 1,100 PoPs within ISP networks. This highly optimized network makes it _extremely efficient_ at delivering your website to your visitors anywhere around the world. "PoP" locations are designed to reduce latency by caching content closer to your site's visitors.

**Performance**

* **Faster Loading Times**, static content (pages, images, CSS, JavaScript) is cached at "edge locations" around the world
* **Improved User Experience**, Faster load times lead to higher user engagement, reduced bounce rates, and improved search engine optimization (SEO) rankings
* **Reduced Server Load**, by serving cached content from edge locations, CloudFront minimizes requests to your WordPress website

When your website is optimized for performance your [PageSpeed Lighthouse scores](https://pagespeed.web.dev/) should improve.

**Enhanced Security**

* **DDoS Protection**, includes AWS Shield Standard
* **SSL/TLS Security**, force https only and includes free SSL Certificates
* **AWS WAF**, a Web Application Firewall with a depth of options including specific WordPress protections (may incur additional costs)

You should achieve a grade of "A" on [Qualys SSL Server Test](https://www.ssllabs.com/ssltest/) when CloudFront is configured with the recommended TLSv1.2_2021 or newer security policy.

**Scalability and Reliability**

* **Global Reach** with over 750 PoPs plus over 1,100 PoPs within ISP networks
* **High Availability**, can serve cached content when site is down
* **Cost Efficiency**, can be cost-effective, especially for websites with high traffic with the new [CloudFront flat-rate pricing plans](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/flat-rate-pricing-plan.html)

**Technology**

* **IPv6**, a superior protocol to IPv4 and in some regions of the world is the only protocol that is available
* **HTTP/2 and HTTP/3** improve web performance through faster loading speeds, enhanced security, and better resource handling
* **Gzip and Brotli compression**, smaller file sizes improve application performance by delivering your content faster to visitors
* **Multi-Proxy**, route specific path patterns to other web applications easily by adding additional "Origins", allowing you to host more than just WordPress with the same hostname

Learn more about [AWS CloudFront](https://aws.amazon.com/cloudfront/).

== Developed by an AWS Community Builder ==
FrontPup is developed and maintained by [Angelo Mandato](https://angelo.mandato.com), an [AWS Community Builder](https://builder.aws.com/community/@angelomandato). Angelo has been developing WordPress plugins and themes since 2005 and has been architecting applications including WordPress hosted on Amazon Web Services since 2007.

== Installation ==

= Installation from within WordPress =

1. Visit **Plugins > Add New**.
2. Search for **FrontPup**.
3. Install and activate the FrontPup plugin.

= Manual installation =

1. Upload the entire `frontpup` folder to the `/wp-content/plugins/` directory.
2. Visit **Plugins**.
3. Activate the FrontPup plugin.

= After activation =

1. Visit the new **FrontPup** menu.
2. Enable the options you would like to use.

If you configure Clear Cache Settings, you can now use the FrontPup admin bar menu option to quickly clear the cache. This action uses AJAX and will perform the action without leaving the page or disrupting your work.

== Frequently Asked Questions ==

= Do I need an AWS CloudFront to use this plugin? =

Yes, you need an AWS account with [CloudFront](https://aws.amazon.com/cloudfront/) setup for your website.

= Do I need to host my WordPress site on AWS? =

No, but CloudFront is most effective when used within the AWS network.

= What is the best way to host a WordPress website on AWS? =

There are many ways to host a WordPress website on AWS. Here is quick list.

* Lightsail - A CPanel like approach to setting up a WordPress website with only a few clicks
* EC2 Instance(s) - Run your own server(s) to host your WordPress website
* ECS Tasks - Run Docker containers using the AWS Elastic Container Service
* EKS - Run WordPress on AWS Elastic Kubernetes Service

There are thousands of formulas online that explain how to host WordPress on AWS. The method you pick comes down to the architecture you want to use and how much complexity you want with managing your website.

== Screenshots ==

1. Welcome to FrontPup with CloudFront
2. Welcome screen without CloudFront
3. Page Cache-Control settings
4. Clear cache settings
5. Non-intrusive Clear CloudFront cache from WordPress admin bar
6. Non-intrusive Clear CloudFront cache from WordPress admin bar processing...
7. Non-intrusive Clear CloudFront cache from WordPress admin bar successful!
8. Non-intrusive Clear CloudFront cache from WordPress admin bar error


== Changelog ==

The FrontPup plugin is maintained on GitHub [https://github.com/painlessanalytics/frontpup](https://github.com/painlessanalytics/frontpup). Code contributions are welcome.

Changelog

= 1.2 =

Released: 2026-02-27

Clear cache in admin bar enhanced

* New: Non-intrusive admin bar clear cache functionality.
* JavaScript logic rewritten to not rely on jQuery.
* CSS created with loading.gif embedded directly into css for performance.
* Errors and success message simplified for display in admin bar menu.
* Icon source: [Loading icon.gif](https://commons.wikimedia.org/wiki/File:YouTube_loading_symbol_3_%28transparent%29.gif)

= 1.1 =

Released: 2026-01-30

Clear cache functionality added.

* Added welcome page for the wp-admin
* Added clear cache settings page
* Reorganized admin class, new base class for future settings pages
* Moved views to subfolder of admin folder
* Added FrontPup admin bar menu bar option with "Clear CloudFront Cache" in sub menu (Made it a sub menu so you have to click twice to avoid accidental cache clearing)
* Ajax code for clearing cache created. For now only users who can manage settings can clear the cache (to be customizable in future versions)

= 1.0 =

Released: 2026-01-08

* First version of this plugin

The entire changelog is available on GitHub: [https://github.com/painlessanalytics/frontpup/blob/main/CHANGELOG.md](https://github.com/painlessanalytics/frontpup/blob/main/CHANGELOG.md)

== Upgrade Notice ==

= 1.0 =
Nothing to update, this is the first version.
