=== PhastPress ===
Tags: pagespeed insights, optimization, page speed, optimisation, speed, performance, load time, loadtime, images, css, webp, async, asynchronous, gtmetrix
Requires at least: 4.4
Requires PHP: 5.6
Stable tag: trunk
Tested up to: 5.3
License: AGPL-3.0
Contributors: apeschar
PhastPress automatically optimizes your site for the best possible performance.
== Description ==
PhastPress uses advanced techniques to manipulate your pages, scripts, stylesheets and images to significantly improve load times. It's designed to conform to Google PageSpeed Insights and GTmetrix recommendations and can improve your site's score dramatically.
PhastPress has the Phast web page optimisation engine by [Kibo IT](https://kiboit.com/) at its core:
* Phast optimizes images using PNG quantization and JPEG recoding, optionally through a free API. Small images are inlined into your page to save HTTP requests.
* Phast loads all scripts on your page asynchronously, while maintaining full compatibility with legacy scripts, due to our custom script loader. External scripts are proxied to extend their cache lifetime.
* Phast inlines critical CSS on the fly by comparing the rules in your stylesheets with the elements on your page. PhastPress also inlines Google Fonts CSS.
* Phast bundles all CSS into a single file, which is loaded asynchronously.
* Phast lazily loads IFrames to prioritize the main page load.
Get the full power of Phast for your website by installing PhastPress now.
**Experience any issues?** Please [contact me (Albert) on albert@peschar.net](mailto:albert@peschar.net).
== Installation ==
1. Upload the PhastPress plugin to your site and activate it.
2. Make sure that PhastPress is activated on the Settings page.
3. Test your site. If you experience any issues, please [contact me (Albert) on albert@peschar.net](mailto:albert@peschar.net).
== Frequently Asked Questions ==
= Should I use other optimization plugins with PhastPress? =
No. You do not need any other plugins, such as image optimization (e.g., Smush) or file minification (e.g., Autoptimize) after you install PhastPress, because PhastPress includes all necessary optimizations.
We recommend using the simple combination of PhastPress and [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/) only. This reduces the potential for plugin conflicts, and it is really all you need.
= Is PhastPress a caching plugin? Do you recommend another caching plugin? =
No, PhastPress does not do caching. We recommend using [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/) in combination with PhastPress to speed up your server response time (TTFB).
= Is PhastPress compatible with WP Fastest Cache? =
Yes, but non-caching optimizations must be **disabled**. Turn off the WP Fastest Cache options in [this screenshot](https://peschar.net/s/yQVWIuOuI4ThfRZfkKJa/).
= Is PhastPress compatible with W3 Total Cache? =
Yes, but non-caching optimizations must be **disabled**.
Specifically, the _Prevent caching of objects after settings change_ option causes problems.
= Is PhastPress compatible with other caching plugins? =
Yes. Some caching plugins include optimizations of JavaScript, CSS and/or images. We recommend turning off all optimizations to avoid conflicts with PhastPress.
= PhastPress is enabled, but nothing happens =
You might be using a plugin that compresses the page before PhastPress processes it. When that happens, PhastPress cannot apply optimizations.
For example, if you are using the [Far Future Expiry Header](https://wordpress.org/plugins/far-future-expiry-header/) plugin, disable the option "Enable Gzip Compression".
= Can I use a hook to disable PhastPress? =
Should you need to disable PhastPress on certain pages, you can use the following code to do so:
add_filter('phastpress_disable', '__return_true');
Make sure that this code runs during `template_redirect` or earlier.
= Can I use disable PhastPress on WooCommerce checkout and cart pages? =
Add this code to your theme's functions.php, or to a new file in wp-content/mu-plugins:
add_filter('phastpress_disable', function ($disable) {
return $disable || is_cart() || is_checkout();
});
= How and when does PhastPress clean the cache? =
PhastPress uses filesize and modification time information to detect file changes, so clearing the cache is generally not needed. When you change a script or CSS file, the change should be visible immediately after reloading.
If you do want to clear the cache, you can delete all the data inside `wp-content/cache/phastpress` or `wp-content/plugins/phastpress/cache`.
= How do I exclude a specific script from optimization? =
By default, PhastPress delays the load of all scripts until after the DOM has finished loading, so that the browser can render the page as quickly as possible. If you wish to load specific scripts as soon as possible, such as Google Analytics, you may add the `data-phast-no-defer` attribute to the script. It would be preferable to also mark external scripts as `async`, when possible.
For example:
Or:
This is applied automatically for the Google Analytics script inserted by Monsterinsights since PhastPress 1.29.
== Changelog ==
= 1.44 =
Phast was updated to version 1.41:
* Support compressed external resources (ie, proxied styles and scripts).
= 1.43 =
* Image optimization functionality works again. You will have to re-enable it in the settings panel.
Phast was updated to version 1.40:
* Add s.pinimg.com, google-analytics.com/gtm/js to script proxy whitelist.
= 1.42 =
Phast was updated to version 1.39:
* Remove blob script only after load. This fixes issues with scripts sometimes not running in Safari.
= 1.41 =
Phast was updated to version 1.38:
* Fixed a regression causing external scripts to be executed out of order.
= 1.40 =
Phast was updated to version 1.37:
* Execute scripts by inserting a `