| 开发者 | ismeteroglu |
|---|---|
| 更新时间 | 2026年5月29日 22:05 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
media="print" onload swap pattern, hero images get fetchpriority="high" preload hints, and entry animations are optionally disabled so scrolling and navigation feel instant on mobile. WooCommerce cart, checkout, my-account, and add-to-cart pages are auto-excluded from the cache, the heavy wc-cart-fragments AJAX call can be limited to actual cart pages, and WooCommerce-only CSS and JS are dequeued from blog posts and landing pages where they would otherwise bloat every request. Compatibility is also tested and tuned for Divi, WoodMart, Avada, Astra, GeneratePress, Kadence, Blocksy, OceanWP, Hello Elementor, WPBakery / Visual Composer, Slider Revolution, AOS, Element Pack, and Animate.css.
Why EmiCache
eval(), no obfuscated code, no encrypted PHP.html.gz and .html.br so a single try_files rule serves Brotli or GZIP responses with zero runtime CPU cost, and the Compression module ships ready-to-paste Nginx snippets for static asset delivery. On Apache and LiteSpeed the bundled .htaccess rules handle GZIP via mod_deflate, Brotli via mod_brotli, browser cache headers, ETag and 304 Not Modified responses, and direct-file protection out of the box. Whether your host is a shared cPanel plan, a managed WordPress platform like Cloudways, Hostinger, SiteGround, Kinsta, or WP Engine, or a self-managed VPS with Docker and PHP-FPM, EmiCache adapts to the environment without manual .htaccess edits or wp-config.php constants beyond the standard WP_CACHE define that the plugin sets for you on activation.
Core Web Vitals Optimization
Every EmiCache module is built around the three Core Web Vitals metrics that Google uses for search ranking — Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS) — plus the supporting metrics like Time to First Byte, First Contentful Paint, and Total Blocking Time that PageSpeed Insights and Lighthouse report. LCP is improved through automatic hero image preload with fetchpriority="high", critical CSS inlining per page type, render-blocking stylesheet elimination, font preloading with font-display: swap, and HTML pre-generation so the server returns a static .html file before WordPress even boots. INP is improved through JS Delay (which holds non-essential scripts like Google Tag Manager, Facebook Pixel, Hotjar, and Microsoft Clarity until the first user interaction), JS Defer for everything else, a lightweight jQuery shim that queues inline jQuery calls until the library loads, and Heartbeat API throttling that keeps admin-ajax.php quiet on idle tabs. CLS is prevented through SVG placeholders sized to match each lazy-loaded image, automatic width and height attribute injection on unsized images, and font-display tuning with size-adjust fallbacks. The result is a real, measurable PageSpeed score lift on real-world Elementor and WooCommerce sites — typically a +20 to +40 point gain on mobile when starting from a stock theme plus page builder install, and a stable green Core Web Vitals report in Google Search Console after the next 28-day data window.
Performance Modules
Full Page Cache. Static HTML files served before WordPress loads. GZIP and Brotli pre-compression, ETag headers, 304 Not Modified support, mobile-separate cache, stampede protection, and sitemap-based preload.
HTML, CSS, and JS Minification. Removes whitespace and comments from output. Preserves content inside pre, code, textarea, script, and style tags. Combine option for stylesheets and scripts.
Smart CSS Defer. Eliminates render-blocking plugin stylesheets via the media="print" onload swap pattern. Theme stylesheets and builder dynamic CSS stay render-blocking so the first paint is layout-stable.
JS Defer + JS Delay. Defer attribute injection for non-critical scripts, delay-until-interaction for tracking and widget code (Google Tag Manager, Facebook Pixel, Hotjar, Clarity, and 24 more).
Lazy Loading. Images, iframes, videos, and CSS background images load only when they enter the viewport. YouTube and Vimeo facade placeholders replace the heavy default iframe with a lightweight preview. SVG placeholders prevent CLS on unknown-dimension images.
Image Optimization. Automatic WebP and AVIF conversion using GD, Imagick, or command-line tools (cwebp, avifenc) — whichever is available. Adaptive responsive sizing generates variants at 7 breakpoints with proper srcset / sizes. Original files are never modified.
LCP Image Preload. Auto-detects the largest above-the-fold image and injects a <link rel="preload" as="image" fetchpriority="high"> hint into <head> so the LCP candidate downloads in parallel with HTML.
Disable Entry Animations. Skips scroll-triggered fade-in / slide-up entry animations from Elementor, AOS, Element Pack, WoodMart, and Animate.css. Interactive transitions (sliders, dropdowns, modals) stay active.
Smart Prefetch. Browser-native speculation rules in prefetch mode warm assets for likely navigations without re-firing entry animations.
Critical CSS. Inline above-the-fold CSS per page type. Non-critical stylesheets deferred with preload/onload plus loadCSS polyfill.
CDN Integration. URL rewriting for any CDN. Built-in CloudFlare API (purge URL, purge all, dual auth) and Bunny CDN API. Automatic cache purge on content changes.
Object Cache. File-based persistent object cache drop-in (object-cache.php) with multisite global groups, gzip compression, and file locking. Auto-detects Redis and Memcached and recommends them when available.
Compression. GZIP via mod_deflate and Brotli via mod_brotli (Apache / LiteSpeed). PHP-level Brotli pre-compression for static assets on Nginx.
WordPress Tweaks. Heartbeat API control, emoji script removal (~50 KB saved), oEmbed disable, query string removal from static assets, post revision limiter, WooCommerce-specific optimizations.
Privacy
EmiCache runs entirely on your own server. It does not phone home, does not load remote scripts, does not track users, and does not collect telemetry. The only outbound HTTP requests are the optional CDN API calls described in the "External services" section below, made only when you explicitly configure them.
emi-cache folder to /wp-content/plugins/ (or install via Plugins → Add New → Upload).Yes — EmiCache works with any properly coded WordPress theme. Tested with Astra, GeneratePress, WoodMart, Avada, Divi, OceanWP, Kadence, Blocksy, and the default Twenty-* themes. If a specific module conflicts, every toggle has a per-module exclusion field on its settings page.
Yes. Cart, checkout, my-account, and add-to-cart pages are excluded from caching automatically. WooCommerce-specific tweaks (cart fragment control, script limiting on non-shop pages) are available in the Tweaks panel.
No — running two page caching plugins at once corrupts cached output. EmiCache detects and warns about WP Rocket, W3 Total Cache, WP Super Cache, LiteSpeed Cache, Cache Enabler, and 10 other known plugins.
Yes. On activation EmiCache adds define('WP_CACHE', true); and creates a wp-config.php.emi-cache-backup first. On deactivation the constant is removed. Uninstall removes all data: cache directory, drop-ins, cron events, and the WP_CACHE define.
Click Purge All Cache on the EmiCache Dashboard or in the WordPress admin bar. The cache is also purged automatically when posts are published, updated, or deleted, and when comments are approved.
Yes. Enter your Cloudflare API credentials on the CDN settings page. EmiCache automatically purges Cloudflare cache when local cache is purged. Both API Token and Global API Key authentication are supported.
Originals are never modified. WebP and AVIF variants are generated alongside the original (image.jpg + image.jpg.webp) and served via <picture> tags or .htaccess rewrite. Browsers without support fall back to the original automatically.
The Object Cache module supports multisite with global groups and per-blog isolation. Full multisite page caching is on the roadmap.
Page caching, minification, lazy loading, image optimization, and CDN integration are server-agnostic and work everywhere.
The bundled .htaccess (used by Apache and LiteSpeed) blocks direct access to .php, .log, and .json files inside the cache directory. For Nginx, add the following to your server block as a defense-in-depth measure:
location ~* /wp-content/cache/emi-cache/.+\.(php|log|json)$ { deny all; }
GZIP and Brotli rewrite rules generated by the Compression module apply to Apache and LiteSpeed only. On Nginx, enable gzip on / brotli on at the server level — EmiCache pre-compresses cached pages to .html.gz and .html.br regardless of server.
That audit measures third-party script efficiency (Google Tag Manager, Facebook Pixel, etc.) which EmiCache cannot tree-shake. JS Delay does prevent these scripts from blocking your LCP and FCP — the audit itself is informational ("unscored") and does not affect your PageSpeed score.
<link rel="preload"> hint with fetchpriority="high"advanced-cache.php that broke page caching on every site running 1.2.0 — all 1.2.0 users should upgradesrcset and sizess-maxage support