Actions
Before and after purging URL
Run custom code before and after purging a specific URL in FlyingPress: Before: Afer:Few readersBefore and after purging all pages
Execute custom code before and after purging all pages in FlyingPress: Before purging: After purging:Few readersBefore and after purging everything
Execute custom code before and after purging everything in FlyingPress: Before purging: After purging:Few readersFlyingPress plugin upgraded
Execute custom code when the FlyingPress plugin got updated:Few readers
Filters
Change delay in preloading cache
FlyingPress sets a default delay of 0.5s for cache preloading between pages to prevent server overload. Adjust this delay with the flyingpresspreloaddelay filter. Shared hosting On shared hosting or limited server resources, increase the delay to 1s: Dedicated hosting On dedicated or high-end servers, eliminate the delay by setting it to 0s:PopularGenerate separate cache for mobile
Most websites use responsive layouts, so separate mobile cache isn't typically needed. However, if your theme, plugins, or custom code create different content for mobile/tablet devices based on user-agent, you can enable separate mobile cache with this filter:Some readersChange URLs in the preload list
FlyingPress automatically preloads a list of URLs, including: Home page Posts Pages Custom posts Authors Catgories, tags and other traxonomies Using flyingpresspreloadurls filter, you can customize the list of URLs to preload. Add URLs to preload Remove URLs from preloadFew readersExclude files from JavaScript minify
Although FlyingPress is compatible with 99.99% of JS files, it doesn't provide a UI option for excluding them from minification. However, you can still manually exclude specific JS files if needed using the filter flyingpressexcludefromminify:js:Few readersCache page or not
The flyingpressiscacheable filter is used to specify custom conditions for determining whether FlyingPress should cache a page or not.Few readersModify optimized HTML output
Modify the final HTML optimized by FlyingPress using the flyingpressoptimization:after filter. The altered HTML will be cached and served to visitors:Few readersChange JavaScript delay timeout
FlyingPress defaults to a 10s timeout for JavaScript delay. Customize this timeout using the flyingpressjsdelaytimeout filter. For a 5s timeout, use:Few readersExclude files from CSS minify
Although FlyingPress is compatible with 99.99% of CSS files, it doesn't provide a UI option for excluding them from minification. However, you can still manually exclude specific CSS files if needed using the filter flyingpressexcludefromminify:css:Few readersChange FlyingPress .htaccess rules
FlyingPress adds rules to the .htaccess file for serving cached pages via the web server. Modify these rules with the flyingpresshtaccessrules filter.Few readersAdd or remove URLs to auto purge
FlyingPress automatically purge necessary pages when you publish, update, or delete content. To customize this list of URLs use the flyingpressautopurgeurls filter:Few readersManage access to FlyingPress
Access to the FlyingPress dashboard and features is by default restricted to users with the roles of "administrator" and "editor". Use the flyingpressallowedroles filter to modify access permissions by extending or restricting the allowed roles. Add new roles: Only allow selected roles:Few readersExclude specific user roles from logged-in cache
When the "Cache logged in users" option is enabled in FlyingPress, it creates separate cache versions for each user role. To specifically exclude certain user roles from being cached, use the flyingpresscacheexcludedroles filter Exclude admins and shop managersFew readersChange YouTube placeholder resolution
When "Use placeholder images for YouTube videos" is enabled, the default resolution for the placeholder image is "hqdefault". The other available resolutions in YouTube are: default mqdefault hqdefault sddefault maxresdefault You can change resolution using the filter flyingpressyoutubeplaceholderresolution. Change resolution to maxresdefaultFew readersDisable FlyingPress footprint
FlyingPress adds the following footprint (HTML comment) to the bottom of cached pages: <!-- Powered by FlyingPress for lightning-fast performance. Learn more: https://flyingpress.com. Cached at 1709117717 --> You can disable it if you wish using:Few readersHost third party CSS and JS locally
The flyingpressselfhostexternaldomains filter allows you to customize the list of external domains whose CSS and JS assets are self-hosted by FlyingPress. By default, these domains are self-hosted: cdn.jsdelivr.net cdnjs.cloudflare.com unpkg.com code.jquery.com ajax.googleapis.com use.fontawesome.com bootstrapcdn.com cdn.rawgit.com You can add or remove domains by using this filter in your theme’s functions.php or using a Code Snippets plugin:Few readers
Functions
Nginx configuration to serve cache directly
FlyingPress uses PHP to serve cached pages when running on Nginx. If you prefer the Nginx web server to serve the cached pages directly, use the following configuration.Few readersFlyingPress WP-CLI Commands
Preload Cache: Purge Pages: Purge Everything: Activate License:Few readers