
外掛標籤
開發者團隊
原文外掛簡介
FastLayer is a performance plugin that brings page caching, code optimization, image delivery and database cleanup together under one FastLayer menu in the WordPress admin. Instead of installing and tuning several single-purpose plugins, you enable only the tools you need from one place.
It is built for typical WordPress sites, such as blogs, business sites and WooCommerce stores. Every feature is off by default and can be switched on independently, and FastLayer only writes to files it created itself, so it will not overwrite another plugin’s cache drop-in or configuration line.
Everything is off by default. Turn on one feature at a time and check the front end after each change, so you always know what made the difference.
Highlights
Page caching that serves static HTML to anonymous visitors, with optional background preloading.
Asset optimization for HTML, CSS and JavaScript: minify, combine, defer and delay.
Image optimization with WebP conversion and responsive delivery.
Lazy loading for images, iframes and videos, with low-quality image placeholders.
Optional ImageKit CDN for image delivery, using an endpoint you control.
Database cleanup for revisions, transients and orphaned metadata.
Features
Every tool has its own settings screen and can be enabled independently.
Page caching and cache preloading
Caches anonymous page views as static HTML and refills the cache automatically after a clear.
Cache lifetime: cached pages are kept for a set time (1 to 720 hours) and cleared automatically after that.
Automatic preloading: after a cache clear, pages are warmed in background batches so visitors are less likely to hit a cold cache.
Page discovery: preloading reads your XML sitemap (the WordPress core sitemap, Yoast SEO or All in One SEO), with built-in limits so a large or slow sitemap cannot stall the job. It can also be started manually at any time.
Manual control: clear everything from the FastLayer admin-bar menu or the Dashboard.
Never cached: logged-in users, the admin area, AJAX and REST requests, previews, 404 pages, search results, and POST or HEAD requests.
HTML, CSS and JavaScript optimization
Reduces page weight and render-blocking requests. Each option can be enabled separately.
HTML: minifies markup by removing comments and collapsing extra whitespace, with an option to keep Gutenberg block comments so block markup stays intact.
Minify: shrinks CSS and JavaScript files and can remove comments.
Combine: merges stylesheets and scripts to reduce requests while preserving media-specific styles.
CSS delivery: loads styles without blocking rendering, with a custom critical CSS box, a one-click sample generator, Smart Gutenberg CSS optimization and display=swap for Google Fonts.
JavaScript loading: defers and/or async-loads eligible scripts.
Smart JS Delay: waits for the first user interaction before running eligible non-critical scripts, then restores them after a configurable timeout so nothing is left unloaded.
Safety controls: Safe Mode and exclusion lists (by handle, keyword or pattern) keep chosen scripts untouched.
Image optimization, WebP and lazy loading
Generates lighter image files and defers media that is off screen.
WebP conversion: converts JPEG and PNG attachments to WebP, either automatically on upload or in resumable batches for images that already exist.
Responsive delivery: serves optimized responsive sizes and WebP variants.
Lazy loading: defers images, iframes (YouTube, Vimeo and others) and HTML5 videos.
LQIP: progressive loading with low-quality image placeholders, including placeholder width, quality, blur strength and fade duration controls.
Smart LCP: prioritizes one above-the-fold hero image or background without disabling lazy loading everywhere, with optional preload hints, hero background support and debug logging.
CDN and optional ImageKit integration
Serves assets and images from a host outside your server, or keeps everything on your own domain.
Custom CDN: rewrites internal asset URLs to a CDN hostname you configure.
ImageKit: optionally delivers images through ImageKit. Only your ImageKit endpoint is stored; no API keys are requested or saved. See External Services for exactly what is sent, and by whom.
Database cleanup
Removes unused rows and optimizes tables, showing counts before anything is deleted.
Tables: optimizes database tables.
Posts: removes post revisions, trashed posts, spam comments and auto-drafts.
Transients and cache: removes expired or all transients, and oEmbed cache rows.
Orphaned data: removes duplicate or orphaned post, comment, user and term metadata.
Safety: item counts are shown before cleaning, and a Clean All control selects every option at once.
Exclusions and diagnostics
Keeps FastLayer away from anything that must stay untouched, and explains cache decisions when something looks wrong.
Cache exclusions: exclude URLs, cookies and user agents from caching.
Asset exclusions: exclude individual CSS and JS files by path, pattern or external domain.
Debug logging: records cache decisions, Smart LCP and Smart JS Delay activity.
Admin-bar actions: Clear All Cache, Clear CSS/JS Cache and Preload Cache.
Compatibility
FastLayer is built to sit alongside the plugins and themes you already run.
Run one page-cache engine and one minify engine per site. Two plugins doing the same job can produce conflicting output.
Page builders and e-commerce: Smart JS Delay keeps critical dependencies, Elementor and WooCommerce checkout/cart, and navigation scripts running immediately; exclusions and Safe Mode cover anything left over.
Servers: Apache and LiteSpeed apply the .htaccess rules directly, while nginx needs a manual server-level WebP rule. Page caching and asset optimization work on nginx, and FastLayer shows an admin notice with guidance when it detects nginx.
Multisite: not currently supported.
Troubleshooting
Start here when something does not look right, and change one option at a time.
My changes are not showing on the front end
FastLayer clears its cache automatically when posts, comments, terms or the active theme change. If you are also running a server, CDN or second caching layer, that layer may still be serving an older copy. Clear the FastLayer cache from the admin bar, then clear your CDN or server cache as well.
Styles or scripts break after I enable optimization
Turn the feature off, then re-enable options one at a time to find the cause. Add the affected files to the exclude list on the CSS or JavaScript screen. For JavaScript, enable Safe Mode or use Smart JS Delay instead of plain defer, so fragile scripts keep working.
WebP conversion is unavailable on my server
WebP conversion needs GD with WebP support or Imagick with WebP support. The Media screen reports exactly what your server has. Ask your host to enable GD WebP or Imagick WebP, then reload the screen.
Some images were not converted to WebP
WebP conversion only processes images the server can read and write to. The bulk screen reports how many images converted, how many failed and how many remain, and View Detailed Logs shows which files were skipped.
My host does not allow .htaccess changes
On nginx and on hosting that blocks .htaccess edits, add the WebP rule at the server level instead. Page caching does not depend on .htaccess and continues to work normally.
External Services
This plugin can optionally integrate with one external, third-party service. It is off by default, and FastLayer only contacts that service once you configure it. The per-service notes below explain exactly when a request is made and what it contains.
ImageKit
ImageKit is a third-party image optimization and delivery service operated by ImageKit (https://imagekit.io/). It is not operated by, affiliated with, or endorsed by FastLayer. By enabling it you are choosing to have your site contact a service outside of your own hosting, so you should review ImageKit’s terms of service and privacy policy on their own website before enabling it.
Is it on by default? No. Image delivery stays off until you turn on the “Enable ImageKit for image delivery” toggle under FastLayer > CDN. FastLayer only rewrites your image URLs to ImageKit while that toggle is on and an endpoint is saved. Be aware that FastLayer still contacts your endpoint from the admin screen even when the toggle is off: once an endpoint is saved, opening the CDN settings screen, or clicking the connection test, sends the server-side request described below before you enable the toggle.
What does FastLayer ask you for? Only your ImageKit URL endpoint. FastLayer does not ask for, store, or transmit an ImageKit public key, private key, auth key, or any other account credential. Authentication and billing remain entirely between you and ImageKit.
What does FastLayer itself send, and when? Only from your admin screen, and only when you act: when you click the plugin’s ImageKit connection test, and when an administrator opens the FastLayer > CDN settings screen. On each of those actions your WordPress server requests one image URL at the endpoint you configured. That request contains:
the uploads path of one of your own images (with your site’s scheme and domain removed);
an image transformation string in the tr query parameter that asks ImageKit to choose the output format and quality automatically and to return a specific display width.
FastLayer never uploads the contents of your image files to ImageKit, and these server-side requests carry no visitor or user data: no IP addresses, user agents, cookies, referrer data, WordPress user names, or e-mail addresses.
What happens once the toggle is on (visitors’ browsers)? When the toggle is on and an endpoint is saved, FastLayer rewrites the image URLs in your front-end pages to that endpoint. The images are then loaded by each visitor’s own browser directly from ImageKit, not through your WordPress server. ImageKit therefore receives those requests straight from the browser, including the requested image path and transformation and standard request data such as the visitor’s IP address and user agent (and the referring page). FastLayer does not send that data; the browser does, and ImageKit handles it under ImageKit’s own privacy policy. This affects front-end page views only, never admin, AJAX, cron or REST requests.
How is it protected? For the requests FastLayer itself makes, FastLayer restricts the host to ImageKit’s own hosts (imagekit.io and its subdomains) and rejects requests to any other host, to IP addresses, and to URLs containing embedded credentials. If you enter an endpoint without a scheme, FastLayer adds https://. If you enter one that explicitly begins with http://, FastLayer will use it as written, so enter your https:// endpoint to keep that connection encrypted. Front-end image URLs are built from whichever endpoint you save, so the same advice applies there.
What is stored locally? The endpoint you enter is saved in your WordPress options and is also written into a JSON configuration file FastLayer generates at wp-content/cache/wp-fastlayer/config.json (or sites/{blog_id}.json on multisite networks). This value is deleted when you uninstall the plugin.
Uninstall and data removal
Deactivate: removes the advanced-cache.php drop-in, the define( 'WP_CACHE', true ); line in wp-config.php, and the marked WebP block in .htaccess. Your settings and cached files are kept.
Delete: removes the plugin’s options, transients, cron jobs and generated cache files, including the saved ImageKit endpoint, which is stored in your options and in the generated wp-content/cache/wp-fastlayer/config.json (or per-site JSON files).
Not removed: WebP image files created next to your uploads are left in place.
