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’ motto is no configuration. Install, activate and go!

PhastPress has the Phast web page optimisation engine by Albert Peschar at its core.

Image optimization:

  • Phast optimizes images using PNG quantization (pngquant) and JPEG recoding (libjpeg-turbo).
  • Phast inlines small images (< 512 bytes) in the page.
  • Phast converts JPEG images into WebP for supporting browsers.
  • Phast enables native lazy loading to speed up page loading and save bandwidth.

Asynchronous scripts and stylesheets:

  • Phast loads all scripts on your page asynchronously and in a single request, while maintaining full compatibility with legacy scripts, due to our custom script loader.
  • Phast proxies external scripts to extend their cache lifetime.
  • Phast inlines critical CSS automatically by comparing the rules in your stylesheets with the elements on your page.
  • Phast loads non-critical CSS asynchronously and in a single request.
  • Phast inlines Google Fonts CSS.
  • 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


  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


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.

I recommend using the simple combination of PhastPress and WP Super Cache only. This reduces the potential for plugin conflicts, and it is really all you need.

Fast Velocity Minify is not compatible with PhastPress, and causes PhastPress not to work. Please use either plugin, but not both.

What about caching and compatibility with caching plugins?

Caching means saving the HTML from the first visit to a page for later visits, so it does not have to be generated each time. Caching also helps performance with PhastPress, because the page needs to be optimized only once. It is recommendable to use a caching plugin with PhastPress.

PhastPress is not a caching plugin. I recommend using WP Super Cache in combination with PhastPress to speed up your server response time (TTFB).

In case you are using another caching plugin, please read the notes below:

WP Fastest Cache: Compatible with PhastPress, but non-caching optimizations must be disabled. Turn off the WP Fastest Cache options in this screenshot.

W3 Total Cache: Compatible with PhastPress, but non-caching optimizations must be disabled. Specifically, the Prevent caching of objects after settings change option causes problems.

Cache Enabler (by KeyCDN): Not compatible with PhastPress. Cached pages will not be optimized.

Generally, PhastPress should be compatible with other caching plugins as well. Some caching plugins include optimizations of JavaScript, CSS and/or images. I recommend turning off all optimizations to avoid conflicts with PhastPress.

Is PhastPress compatible with Asset CleanUp: Page Speed Booster?

Yes. The core functionality of Asset CleanUp: Page Speed Booster complements PhastPress by removing unused JavaScript and CSS from the page.

Do not use Asset CleanUp’s features for optimizing CSS and JS. These features can cause conflicts with PhastPress, and they are not needed, because PhastPress already does this.

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 plugin, disable the option “Enable Gzip Compression”.

Why does PhastPress not impact the “Fully Loaded Time” measured by GTmetrix?

The “Fully Loaded Time” in GTmetrix is the amount of time taken until all network activity ceases. This measurement can be misleading because it does not take into account the order in which resources load.

Normally, external resources such as scripts and stylesheets must be downloaded, parsed and executed before the page can be rendered. PhastPress changes this sequence by including all necessary resources (that is, the critical CSS) in the page, and executing scripts asynchronously, so that they do not block the rendering of the page.

This causes the page to be visible earlier in the browser, but does not change GTmetrix’s fully loaded time.

In order to see this effect, register and log in to GTmetrix and enable the “Video” option. Then test your site (with Phast enabled), and use the “Compare” button to again test your site, but while appending “?phast=-phast” to the URL (eg, When the comparison loads, select the “Filmstrips” tab and you’ll see the difference. The Phast-optimized version of your site should start rendering much earlier.

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:

<script data-phast-no-defer>
// my script goes here


<script async data-phast-no-defer src=""></script>

If you (or a plugin) are using wp_enqueue_script to add the script to the page, you can use the phast_no_defer data key to stop PhastPress from processing the script:

wp_script_add_data('my_script_name', 'phast_no_defer', true);

Make sure this is run after registering the script. If you are trying to apply this to a script loaded by a plugin, you could use the wp_print_scripts hook:

add_filter('wp_print_scripts', function () {
    wp_script_add_data('my_script_name', 'phast_no_defer', true);

This is applied automatically for these scripts:

  • Google Analytics script inserted by Monsterinsights since PhastPress 1.29.
  • Tracking script inserted by Slimstat Analytics since PhastPress 1.30.
  • Google Analytics script inserted by Google Site Kit since PhastPress 1.75.
  • Google Analytics script inserted by GA Google Analytics since PhastPress 1.76.

Does PhastPress collect data or use external services?

Images are optimized using a free API, provided by the creator of PhastPress.

During image optimization, the following data is sent to the API:

  • the URL on which PhastPress is used
  • the version of the plugin
  • the PHP version (to track compatibility requirements)
  • the image itself

Images are sent to the API only once. Processed images are stored locally, and not retained by the API.

If image optimization is switched off, the API will not be used.


12. listopada 2020.
excellent plugin de cache, gratuit et sans besoin de réglages. Je n'utilise plus WP Rocket du coup.
06. listopada 2020.
I tested many plugins of this kind. I was somehow skeptical when I tried Phastpress. Checking GTMetrix after installing yielded outstanding results. In particular, my score went up in both tests, reaching 99, without changing anything else: same theme, same plugins. Try by yourself, if you don't believe me. This plugin is a little gem.
04. listopada 2020.
great plugin who improve really well the loading of my content but the contern is here : "You can enable text compression in your web server configuration. URL Transfer Size Potential Savings …phast.php/c2VydmljZ….q.js( 140.5 KiB 96 KiB …phast.php/c2VydmljZ….q.js( 108.4 KiB 64.9 KiB" " It seem like the plugin use js whose are not previously compressed by brotli or gzip and i don't know how to do it by myself. I use o2switch and it's a hosting provider with brotli enable by default. And it's really activated so i hope my comment can be considered for an update.
02. listopada 2020.
I have been trying all the optimize plugins to make my site faster, but I was always running into problems with speed even though GT Metrix was showing my site speed all in the green, but the actual load times were not converting. Until, I downloaded this plugin, and my actual load time on my phone and computer was Amazing with a capital A. I also showed even more impressive GT Metrix scores than I did before. I Before Phast Press, I was begging for any solution I could find, but now I am rocking and rolling with reputable speed and loading. The maker of this plugin is Top Tier. How can I thank them enough for this game changer.
09. rujna 2020.
THANKS Albert for your plugin and thanks a lot for today's help on my site! If I could, I would leave you 10 stars for both, the plugin and the support! Good luck in further work !!!
Pročitajte svih 68 recenzija

Suradnici i Programeri

“PhastPress” is open source software. The following people have contributed to this plugin.


Prevedite “PhastPress” na svoj jezik.

Zainteresirani ste za razvoj?

Pregledajte kôd, pogledajte SVN spremišteili se pretplatite na dnevnik razvoja od RSS.

Dnevnik promjena

1.83 – 2020-10-22

Phast was updated to version 1.75:

  • Insert path separators (/) into bundler URLs in order to avoid Apache’s 255 character filename limit.

1.82 – 2020-10-20

Phast was updated to version 1.74:

  • Ignore calls to document.write from async or defer scripts, in line with normal browser behaviour.

1.81 – 2020-10-20

  • Apply phast_no_defer script attribute to scripts generated by wp_localize_script.

1.80 – 2020-10-05

  • Prevent direct access to bootstrap.php, low-php-version.php and files in classes directory. This is not a security risk, but could generate errors.

1.79 – 2020-09-21

1.78 – 2020-09-09

  • Don’t resize images based on width/height attributes on img tags.

1.77 – 2020-09-08

  • Exclude cache from All-in-One WP Migration backups.

Phast was updated to version 1.71.

  • Only process JPEG, GIF and PNG images. (Fix regression in 1.65.)

1.76 – 2020-09-04

  • Don’t defer GA Google Analytics scripts.

1.75 – 2020-09-04

  • Don’t defer Google Site Kit Analytics script.
  • Add support for phast_no_defer script attribute.

1.74 – 2020-08-30

Phast was updated to version 1.70.

  • Add Last-Modified header to service response.

1.73 – 2020-08-27

  • Don’t use error suppression when checking query parameters, instead use isset. This prevents notices from appearing in some error logging plugins, even though they are suppressed.

1.72 – 2020-08-26

Phast was updated to version 1.69.

  • Fix CSS proxy URL generation not to include __p__ filename twice.

1.71 – 2020-08-25

Phast was updated to version 1.68.

  • Support URLs generated via Retina.js (when path info is enabled).

1.70 – 2020-08-21

Phast was updated to version 1.67.

  • Fix IE 11 stylesheet fallbacks.

1.69 – 2020-08-21

Phast was updated to version 1.66.

  • Convert <link onload="media='all'"> to <link media="all"> before inlining.
  • Elide media attribute on generated style tags if it is all.

1.68 – 2020-08-20

Phast was updated to version 1.65.

  • Use path info URLs for bundler and dynamically inserted scripts.
  • Don’t whitelist local URLs but check that the referenced files exist.
  • Support BunnyCDN by optimizing resources on the CDN domain and loading processed resources via the CDN domain.

1.67 – 2020-08-18

Phast was updated to version 1.64.

  • Preserve control characters in strings in minified JavaScript.
  • Use JSON_INVALID_UTF8_IGNORE on PHP 7.2+ instead of regexp-based invalid UTF-8 character removal.

1.66 – 2020-08-13

Phast was updated to version 1.63.

  • Images in AMP documents are now optimized. No other optimizations are performed in AMP documents.

1.65 – 2020-08-11

Phast was updated to version 1.62.

  • Add an option to lazy load images using native lazy loading (loading=lazy attribute). This is enabled by default.

1.64 – 2020-07-21

Phast was updated to version 1.61.

  • Added an option to disable gzip compression of processed resources downloaded via phast.php. This might help to fix issues on hosts that compress already compressed responses.

1.63 – 2020-07-21

Phast was updated to version 1.60:

  • Ensure that requestAnimationFrame callbacks run before onload event.
  • Don’t rewrite anchor URLs (like #whatever) in CSS.

1.62 – 2020-07-08

Phast was updated to version 1.58:

  • Rewrite each URL in a CSS rule, not just the first one.

1.61 – 2020-06-17

  • Disable PhastPress during Asset Cleanup: Page Speed Booster analysis.

1.60 – 2020-06-10

Phast was updated to version 1.55:

  • Only rewrite image URLs in arbitrary attributes inside the <body> tag.
  • Don’t optimize image URLs in attributes of <meta> tags.
  • When optimizing images, send the local PHP version to the API, to investigate whether PHP 5.6 support can be phased out.

1.59 – 2020-06-09

Phast was updated to version 1.54:

  • Fix writing existing read-only cache files (on Windows).

1.58 – 2020-06-09

Phast was updated to version 1.53:

  • Fix caching on Windows by not setting read-only permissions on cache files.
  • Add a checksum to cache files to prevent accidental modifications causing trouble.

1.57 – 2020-06-05

Phast was updated to version 1.51:

  • Rewrite image URLs in any attribute, as long as the URL points to a local file and ends with an image extension.

1.56 – 2020-06-04

Phast was updated to version 1.50:

  • Ignore link elements with empty href, or one that consists only of slashes.
  • Replace </style inside inlined stylesheets with </ style to prevent stylesheet content ending up inside the DOM.
  • Add font-swap: block for Ionicons.
  • Remove UTF-8 byte order mark from inlined stylesheets.

1.55 – 2020-05-28

  • Fix release.

1.54 – 2020-05-28

1.53 – 2020-05-27

Phast was updated to version 1.49:

  • Send uncompressed responses to Cloudflare. Cloudflare will handle compression.

1.52 – 2020-05-25

Phast was updated to version 1.48:

  • Stop excessive error messages when IndexedDB is unavailable.

1.51 – 2020-05-19

Phast was updated to version 1.47:

  • Process image URLs in data-src, data-srcset, data-wood-src and data-wood-srcset attributes on img tags.

1.50 – 2020-05-18

This release should have updated Phast to version 1.47, but didn’t, by accident.

1.49 – 2020-05-14

Phast was updated to version 1.46:

  • Whitelist for CSS processing.

1.48 – 2020-05-13

Phast was updated to version 1.45:

  • Use font-display: block for icon fonts (currently Font Awesome, GeneratePress and Dashicons).

1.47 – 2020-05-04

Phast was updated to version 1.44:

  • Support data-pagespeed-no-defer and data-cfasync="false" attributes on scripts for disabling script deferral (in addition to data-phast-no-defer).
  • Leave data-{phast,pagespeed}-no-defer and data-cfasync attributes in place to aid debugging.

1.46 – 2020-04-30

Phast was updated to version 1.43:

  • Base64 encode the config JSON passed to the frontend, to stop Gtranslate or other tools from mangling the service URL that is contained in it.

1.45 – 2020-04-15

Phast was updated to version 1.42:

  • Speed up script load, and fix a bug with setTimeout functions running before the next script is loaded.


Phast was updated to version 1.41:

  • Support compressed external resources (ie, proxied styles and scripts).


  • Image optimization functionality works again. You will have to re-enable it in the settings panel.

Phast was updated to version 1.40:

  • Add, to script proxy whitelist.


Phast was updated to version 1.39:

  • Remove blob script only after load. This fixes issues with scripts sometimes not running in Safari.


Phast was updated to version 1.38:

  • Fixed a regression causing external scripts to be executed out of order.


Phast was updated to version 1.37:

  • Execute scripts by inserting a <script> tag with a blob URL, instead of using global eval, so that global variables defined in strict-mode scripts are globally visible.


Phast was updated to version 1.36:

  • Clean any existing output buffer, instead of flushing it, before starting Phast output buffer.


Phast was updated to version 1.35:

  • Use all service parameters for hash-based cache marker. This might fix some issues with stale stylesheets being used.


  • The phastpress_disable hook is now triggered during template_redirect instead of plugins_loaded, which allows you to use many more functions in your hook handlers.

Phast was updated to version 1.34.


Phast was updated to version 1.33:

  • Stop proxying dynamically inserted scripts after onload hits.
  • Combine the hash-based cache marker with the original modification time-based cache marker.
  • Remove comment tags (<!-- ... -->) from inline scripts.
  • Send Content-Length header for images.


Phast was updated to version 1.31:

  • Change CSS cache marker when dependencies (eg, images) change. This prevents showing old images because CSS referencing an old optimized version is cached.


  • Store service config in service-config-* files for AppArmor compatibility, if there’s a rule that prevents writing *.php files.
  • Create index.html in cache directory to prevent path enumeration.


Phast was updated to version 1.29:

  • Trick mod_security into accepting script proxy requests by replacing
    src=http://… with src=hxxp://....


Phast was updated to version 1.28:


Phast was updated to version 1.26:


  • Don’t delay SlimStats script.


  • Don’t delay Monsterinsights script so that Google Analytics works more reliably.

Phast was updated to version 1.25:

  • Keep newlines when minifying HTML.


Phast was updated to version 1.24:

  • Send Content-Security-Policy and X-Content-Type-Options headers on resources
    to speculatively prevent any XSS attacks via MIME sniffing.


  • Load configuration via wp-load.php instead of wp-config.php.


  • Fix incompatibility with Thrive Architect.


  • Test with WordPress 5.3.
  • Fix incompatibility with Divi Visual Builder.


Phast was updated to version 1.23:

  • Make CSS filters configurable using switches.


  • Disable optimizations inside Yellow Pencil editor.


  • Mitigate restrictive access rules for /wp-content by adding our own .htaccess for phast.php.
  • Try to put cache directory in wp-content/cache or wp-content/uploads before using the plugin directory.

Phast was updated to version 1.22:

  • Remove empty media queries from optimize CSS.
  • Use token to refer to bundled resources, to shorten URL length.
  • Clean up server-side statistics.
  • Add HTML minification (whitespace removal).
  • Add inline JavaScript and JSON minification (whitespace removal).
  • Add a build system to generate a single PHP file with minified scripts.


Phast was updated to version 1.21:

  • Don’t attempt to optimize CSS selectors containing parentheses, avoiding a bug removing applicable :not(.class) selectors.


  • Fix compatibility issues by not prepending our autoloader.


Phast was updated to version 1.20:

  • Add *, to CSS whitelist.
  • Don’t apply rot13 on url-encoded characters.
  • Use valid value for script type to quiet W3C validator.


Phast was updated to version 1.18:

  • Don’t rewrite page-relative fragment image URLs like fill: url(#destination).


Phast was updated to version 1.17:

  • Restore script attributes in sorted order (that is, src before type) to stop Internet Explorer from running scripts twice when they have src and type set.


  • Add phastpress_disable hook.


  • Fix an issue whereby updating to 1.14 would reset the security token, invalidating links used in pages in a full-page cache. (To fix the issue, clear the cache of your full-page caching plugin.)


  • Use the correct service URL when the site URL changes after activation.

Phast was updated to version 1.16:

  • Encode bundler request query to avoid triggering adblockers.
  • Use a promise to delay bundler requests until the end of the event loop, rather than setTimeout.


Phast was updated to version 1.15:

  • Scripts can now be loaded via document.write. This restores normal browser behaviour.


Phast was updated to version 1.14:

  • document.write now immediately inserts the HTML into the page. This fixes compatibility with Google AdSense.


Phast was updated to version 1.13.1:

  • Remove query strings from URLs to stylesheets and scripts loaded from the local server. It is redundant, since we add the modification time to the URL ourselves.


  • Add version information to console log.
  • Fix notice regarding undefined variable in settings panel.


Phast was updated to version 1.12.2:

  • Increase timeouts for API connection.


Phast was updated to version 1.12.1:

  • Don’t use IndexedDB-backed cache on Safari.


  • Use HTTPS for the API connection.

Phast was updated to version 1.12.0:

  • Rewrite data-lazy-src and data-lazy-srcset on img, source tags for compatibility with lazy loading via BJ Lazy Load, possibly other plugins.


  • Removed script rearrangement setting.

Phast was updated to version 1.11.0:

  • Proxy CSS for,, *
  • Proxy icon fonts and other resources from
  • Improve log messages from image filter.
  • Do not proxy, to fix NotLoadingAPIFromGoogleMapError.
  • Removed src attribute from scripts that are loaded through the bundler, so that old versions of Firefox do not make extraneous downloads.
  • Check that the bundler returns the right amount of responses.
  • Per-script debugging message when executing scripts.
  • Animated GIFs are no longer processed, so that animation is preserved.


  • Disable PhastPress for Elementor previews (edit mode).


  • Fix installation notice dismissal.

Phast was updated to version 1.9.3:

  • <!-- comments in inline scripts are removed only at the beginning.


Phast was updated to version 1.9.2:

  • Empty scripts are cached correctly.


Phast was updated to version 1.9.1:

  • Async scripts are now not loaded before sync scripts that occur earlier in the document.


Phast was updated to version 1.9.0:

  • Scripts are now retrieved in a single request.
  • Non-existent filter classes are ignored, and an error is logged.
  • A ‘dummy filename’ such as __p__.js is appended to service requests to trick Cloudflare into caching those responses.
  • The maximum document size for filters to be applied was corrected to be 1 MiB, not 1 GiB


This release was built with a pre-release version of Phast 1.9.0 that caused incorrect triggering of the browser load event. Please upgrade to PhastPress 1.8.1.


  • Update Phast to version 1.8.0.


  • Do not regenerate the service request token on every configuration change or plugin update.


  • Fix issue with CSS not respecting disabled path info setting.


  • Update Phast to commit 9e1471a.
  • Fix MyParcel (and possibly other plugins) compatibility by not optimizing any pages but WordPress’ index.php.


  • Revamped the settings panel.


  • Remove old notice about sending admin email.

See Phast change log


  • The admin email is no longer sent to the image optimisation API.


  • Update to Phast 1.5.1.

See Phast change log


  • Disable scripts rearrangement by default.

This version was based on Phast 1.5.0.


See Phast change log


  • Add automatically configured option to use query strings rather than path info for service requests.
  • Automatically enable PhastPress if everything seems fine.
  • Use WordPress’ Requests library instead of cURL.

See Phast change log


  • PhastPress is now automatically enabled on installation.
  • The image optimisation API is now automatically enabled on installation.

See Phast change log


See Phast change log


  • PhastPress now works on Windows.

See Phast change log


See Phast change log


See Phast change log