=== WPAdmin AWS CDN ===
Contributors: luckychingi
Tags: CDN, Free, Amazon, AWS, Cloudfront
Donate link: https://donate.stripe.com/dRmaEY14z2Mn6fifvd8so08
Requires at least: 5.6
Tested up to: 6.9.1
Requires PHP: 7.4
Stable tag: 4.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Setup Amazon Cloudfront CDN for your website. Now with intuitive layout and more flexibility.

== Description ==

The new & improved Amazon Cloudfront Distribution Plugin by WPAdmin. Setup Amazon Cloudfront CDN for your website. Now with intuitive layout and more flexibility. The new & improved Amazon Cloudfront Distribution Plugin by WPAdmin. Setup Amazon Cloudfront CDN for your website. Now with intuitive layout and more flexibility. Also supports WordPress Multisite installation (not tested though).

**Key Features:**

* **One-click distribution creation** – Create CloudFront distributions directly from WordPress
* **Full CDN settings control** – Configure cache policy, TLS version, price class, and compression
* **Custom domain support** – Use your own CDN domain (e.g., cdn.yoursite.com)
* **SSL certificate management** – Request free SSL certificates from AWS Certificate Manager
* **Smart URL rewriting** – Automatically rewrites media, CSS, and JS URLs to use CloudFront
* **Granular exclusions** – Exclude specific pages and assets containing certain keywords
* **Sub-folder & sub-domain support** – Works with all WordPress installation types
* **Cache invalidation** – Purge CloudFront cache directly from WordPress
* **Enable/disable toggle** – Instantly switch CDN on or off without losing settings
* **Built-in documentation** – Comprehensive how-it-works guide and FAQ

== Installation ==
= Using the WordPress Plugin Search =



1. Navigate to the `Add New` sub-page under the Plugins admin page.

2. Search for `WPAdmin AWS CDN`.

3. The plugin should be listed first in the search results.

4. Click the `Install Now` link.

5. Lastly click the `Activate Plugin` link to activate the plugin.



= Uploading in WordPress Admin =



1. [Download the plugin zip file](https://downloads.wordpress.org/plugin/aws-cdn-by-wpadmin.4.0.1.zip) and save it to your computer.

2. Navigate to the `Add New` sub-page under the Plugins admin page.

3. Click the `Upload` link.

4. Select `wpadmin-aws-cdn` zip file from where you saved the zip file on your computer.

5. Click the `Install Now` button.

6. Lastly click the `Activate Plugin` link to activate the plugin.



= Using FTP =



1. [Download the plugin zip file](https://downloads.wordpress.org/plugin/aws-cdn-by-wpadmin.4.0.1.zip) and save it to your computer.

2. Extract the `wpadmin-aws-cdn` zip file.

3. Create a new directory named `wpadmin-aws-cdn` directory in the `../wp-content/plugins/` directory.

4. Upload the files from the folder extracted in Step 2.

4. Activate the plugin on the Plugins admin page.


== Frequently Asked Questions ==

= CORS Error: No Access-Control-Allow-Origin header is present on the requested resource =
<h3>Apache</h3>
Add the following in your .htaccess file, immediately under '# END WordPress'
<code>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css)$">
<IfModule mod_headers.c>
Header add Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
</code>
<h3>Nginx</h3>
Add something like this to your vhost config
<code>
location ~* \.(eot|otf|ttf|woff|woff2)$ {
    add_header Access-Control-Allow-Origin *;
}
</code>
Refer to this article for more info: https://github.com/fontello/fontello/wiki/How-to-setup-server-to-serve-fonts

= How To Create An AWS User =
[Follow the steps in this article](https://wpadmin.ca/how-to-create-an-aws-user-with-limited-permissions-to-access-cloudfront-only/)

= Does this plugin require the AWS SDK? =
No. The plugin uses direct AWS API calls with Signature Version 4, so no additional PHP libraries are needed.

= Does it work with WooCommerce? =
Yes. Exclude checkout/cart/account pages in the Exclusions tab for best results.

= How much does CloudFront cost? =
AWS offers a free tier (1 TB transfer/month for 12 months). After that, pricing starts around $0.085/GB.

== Screenshots ==
1. screenshot-1.png
2. screenshot-2.png
3. screenshot-3.png
4. screenshot-4.png
5. screenshot-5.png
6. screenshot-6.png
7. screenshot-7.png

== Upgrade Notice == 
NA

== Changelog ==

= 4.0.1 =
Total rewrite of the plugin and bug fixes