=== Full Site Cache Enabler for KeyCDN === Contributors: ze3kr Donate link: https://www.tlo.xyz/donate/ Tags: keycdn, cache, optimize, performance, speed, pagespeed, html, cdn, keycdn Requires at least: 4.4 Tested up to: 4.4.2 Stable tag: 0.4.2 License: The MIT License License URI: https://github.com/ZE3kr/Full-Site-Cache-Enabler-for-KeyCDN/blob/master/LICENSE Make all HTML page on CDN cache, optimize your website speed. Make your site superfast. == Description == This plugin can help you to use KeyCDN on your WordPress, not only your Media and CSS, but also all HTML page. This plugins can automatically purge the page (And also homepage, archive page, tag page, category page, feed, sitemap) when you publish a page or post. Require: + PHP 5.4+ + Wordpress 4.4+ (I only tested it on 4.4+) [!!! PLEACE READ INSTALLATION BEFORE USE !!!](https://wordpress.org/plugins/full-site-cache-kc/installation/) == Installation == Before use this plugin, you need to have a KeyCDN account. You can [sign up by this link](https://www.keycdn.com/?a=7126), and you can get $10 free credit, that is included 250GB web traffic, it's enough for your test, and can use for a long time (if you don't have too much web traffic). Put the folder `full-site-cache-kc` in your server, to `wp-content/plugins/full-site-cache-kc/`, you can [download it at here](https://wordpress.org/plugins/full-site-cache-kc/). Or if you can add plugin online, you can search `full-site-cache-kc` and install it. After that, you need to finish those setup and configuration step by step, following the introduction below. = 1. Setup KeyCDN = You need to add a `Pull Zone` in KeyCDN, and set `Origin URL` to `http(s)://[The IP of your server]`, set SSL to `Letsencrypt` (You can get free SSL support!), enable `Cache Cookies`, `Strip Cookies` and `Forward Host Header`. Set `Expire (in minutes)` to -1 and set `Max Expire (in minutes)` to 1440 or bigger, and make sure to disable `CORS`. = 2. Setup DNS = You need to use a domain like `www.example.com` or `blog.example.com` but not root domain like `example.com`, because you need to create a CNAME on that domain. If you are using domain like `www.example.com`, you need to create a DNS at `wp-admin.example.com` that point to your server. If you are using domain like `blog.example.com`, you need to create a DNS at `wp-admin-blog.example.com` that point to your server. After you setted up, you need to go to the new host to visit WordPress dashboard. = 3. Setup this plugin = Add these code at the top of `wp-config.php`., just after ` [ 'id' => 10001, 'name' => 'www', ], 2 => [ 'id' => 10002, 'name' => 'ze3kr', ], 3 => [ 'id' => 10003, 'name' => 'blog', ], ]; The number (1,2,3) before each small array is blog id. the `id` is KeyCDN. After that, you can enable this plugin. = 4. Setup WordPress = If you are using multisite, it's hard to change URL, you need to create a new blog named `www`, and import the old blog to the new one. When you finished `3. Setup this plugin`, it will automatically redirect non-www to www domain. And you need to change Siteurl to the new domain, keep Home URL not change. Example: Siteurl is `wp-admin.example.com` and Homeurl is `www.example.com`. Or Siteurl is `wp-admin-blog.example.com` and Homeurl is `blog.example.com`. And if you need to edit your post, or go to the dashboard, you need to goto `wp-admin.example.com/wp-admin/` or `wp-admin-blog.example.com/wp-admin/` == About purge == This plugin will purge all page that need to be purge, but when your customized your theme or changed your theme, you need to purge your site manually. **We highly recommend you just purge tag `wordpress`**, instead of purge everything. The tag `wordpress` is include all page that generated by WordPress PHP program, and not include static file like Media, CSS and JS. If you purge everything, that will slow down your website and make more request to your orgin server. == Known Issues == + Customize page can't set widgets, if you want to set, goto `/wp-admin/widgets.php`. + Have problems with WP-Cron, suggest [use cron on your server](https://www.lucasrolff.com/wordpress/why-wp-cron-sucks/). == Frequently Asked Questions == = It takes a long time to publish a long time to publish a post or page? = That is because this plugin will purge the cache immediately, and that need to send a request to KeyCDN server. It very depend on your network and KeyCDN network == Changelog == = 0.4.2 = Never redirect when user is logged in. = 0.4.1 = Just update readme.txt = 0.4.0 = + Disallow Direct File Access to plugin files. + Use Unique function (and/or define) names. == Upgrade Notice == = 0.4.2 = You can see admin bar when you enter admin page, can show post/page preview. = 0.4.1 = Just update readme.txt = 0.4.0 = This update changed some function name and variable name, you need to edit `wp-config.php`.