| 开发者 | gauravtiwari |
|---|---|
| 更新时间 | 2026年10月21日 10:13 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
advanced-cache.php drop-in serves stored pages before WordPress loads. Redis object caching and background database cleanup reduce the work WordPress does when a page isn't cached.wp-config.php constant switches everything off if something looks wrong.
It also shows its work. Explain this page tells you why any URL is or isn't cached. Each purge comes with a receipt showing whether it actually reached Cloudflare, the health report lists what needs attention, and settings history lets you roll back a change.
GT Performance suits blogs, content sites, online stores, and anyone who manages sites from WP-CLI or deploy scripts. Everything runs on your own WordPress server. There's no account to create, no telemetry, and the plugin never contacts servers of its own.
Feature highlights
advanced-cache.php drop-in before WordPress loads. Files are written atomically, so a visitor never gets a half-written page, and stale pages rebuild in the background.wp-config.php switches off every optimization and cache read without touching a setting.orderby or lang, can get a cached copy per value instead of skipping the cache. Purging the page clears every copy._lscache_vary cookie, so they never receive the public copy. Purges from WP-CLI or a system cron reach the server through a loopback request.advanced-cache.php drop-in finds the site from the host and path before WordPress loads, the way WordPress routes the request.wp gt-performance network purge every site, rebuild the site map, and set defaults for sites that have not saved their own settings.WP_CACHE, and server rules are installed by a network administrator, and the Redis object cache is configured from the main site. Cloudflare and xCloud edge rules are not available on a network yet.:focus-visible rules, Tailwind's escaped class names, inline SVG, and non-Latin text intact. Stylesheets it can't safely analyze pass through untouched.wp gt-performance cloudflare disconnect, deletes this site's managed rule and purges this site's pages, so Cloudflare never keeps serving pages nothing will refresh.WP_REDIS_* constants as Redis Object Cache.wp gt-performance doctor exits with status 1 when a check fails, so it fits deploy scripts.wp-config.php constantswp gt-performance cache install-dropin. Each site sets itself up on its first visit.No. GT Performance compiles the dynamic paths, session cookies, and query parameters from active WooCommerce, Easy Digital Downloads, and FluentCart adapters into both the origin and Cloudflare bypass rules.
No. The baseline uses Cache Rules and targeted purge, both available on Cloudflare Free. No Worker or APO subscription is required.
Add define( 'GTPERF_SAFE_MODE', true ); to wp-config.php. Every HTML transformation stops and no page is served from or written to the cache. Your settings stay as they are. Remove the line to turn everything back on.
Yes. When Elementor, Bricks, Divi, Beaver Builder, Oxygen, Breakdance, WPBakery, Brizy, Kadence Blocks, Spectra, GenerateBlocks, or SiteOrigin is active, the classes it adds after the page loads (open menus, active tabs, sticky headers, popups, sliders, animations) are kept. GT Page Blocks Builder and Thrive Architect styles are left untouched. Add your own selectors under Exceptions if a custom script needs more.
No. Stylesheet collection, selector analysis, pruning, and file creation run on your WordPress server.
Yes. Choose Generated file, Inline all used CSS, or Critical inline + remaining file. Hybrid mode falls back to a generated file if the critical part exceeds its inline budget.
Yes. Enter its HTTPS origin-pull URL on the CDN tab and select the static-file extensions it should serve. GT Performance rewrites only same-site assets with those extensions. Third-party URLs, HTML routes, API responses, and unselected file types stay unchanged.
Yes, from 1.3.0, on subfolder and subdomain networks. Every site keeps its own settings, bypass rules, and page cache, so one store's cart cookies or one site's purge never affect another site. Network-activate the plugin, then install the drop-in once from the network admin screen. Cloudflare and xCloud edge rules are not available on a network yet; each site's own page cache works without them.
Yes. Turn on "Let LiteSpeed cache pages" on the Cache tab. GT Performance tells the server which pages to keep, tags them per site and per URL, and purges them on every edit. Signed-in visitors and shoppers get the _lscache_vary cookie, which keeps them away from the public copy. The LiteSpeed Cache plugin does the same job, so GT Performance steps aside while that plugin is active.
On Apache, yes: turn on "Keep copies the web server can serve" and add the server rules on the Cache tab. On Nginx, paste the snippet shown there. On LiteSpeed, use "Let LiteSpeed cache pages" instead; the server rules skip LiteSpeed because OpenLiteSpeed did not apply their cookie and query conditions reliably.
Yes. Tools → Settings history keeps the last 20 saves for up to 90 days and restores earlier values without touching saved credentials. Settings can also be exported to and imported from a JSON file.
Yes. GT Performance reads the WP_REDIS_HOST, port, socket path, scheme, database, ACL password array, prefix, timeout, read-timeout, and disable constants used by Till Krüss's Redis Object Cache. Existing GTPERF_REDIS_* constants remain supported and take highest precedence. The Object Cache screen provides a copy-ready example.
Only when you ask it to. The optional abilities answer requests from an assistant you connect yourself, using an Application Password you create. They're off by default, require an administrator account, and never include credentials. The optional adviser (also off by default) sends a redacted diagnostic report to the AI provider configured in WordPress only after you review exactly what will be sent and press Send. Nothing is sent automatically, from visitors, or from scheduled tasks.
cache/gt-performance/sites/<id>/, and the shared drop-in picks the site from the host and path before WordPress loads. Network admin screen and wp gt-performance network status|purge|map|defaults._lscache_vary for signed-in visitors and shoppers. GT Performance steps aside while the LiteSpeed Cache plugin is active.wp gt-performance server-rules add|remove|status|nginx). Apache serves stored pages, compressed copies included, without PHP; Nginx gets a copy-ready snippet; on LiteSpeed the rules switch on the cache lookup and drop campaign parameters such as utm_source from its key. Rules are rewritten when settings change and removed on deactivation./wp-admin/ or /account/, also cover the same paths below a subfolder site.wp gt-performance cache explain and cache verify accept every hostname --page-url accepts, including ones added with the gt_performance_canonical_hosts filter. Explain this page in Tools accepts them too.database --all-revisions help names the "Run selected optimization" button.page-option.?orderby=price or ?lang=de get their own cached copy (values up to 100 characters, up to 100 copies per page) instead of bypassing the cache, and purging the page clears every copy at the origin and at Cloudflare.wp gt-performance cloudflare disconnect [--forget] and a Disconnect button do the same and turn the integration off.?s[]=x, now bypass the cache. They were read as the page with no query and could be stored under its key.languages/.GTPERF_SAFE_MODE) now also stops the page-cache drop-in from serving stored pages, so nothing is served from the cache while it is on.wp gt-performance database run keeps your "Scheduled revisions to retain". Add --all-revisions to delete every revision, as the Run cleanup button does.wp gt-performance doctor and health exit with status 1 when a check fails. Warnings still exit 0.--page-url must be on this site for cache purge, explain, and verify, and for cloudflare purge.X-GT-Cache-Reason keeps paths such as path:/cart/.wp gt-performance cache preview --post=<id>.wp gt-performance health, with a redacted support export.:before were never pruned, pages with a comment form (including Akismet's) were never served their unused CSS, generated CSS could override a theme's excluded stylesheets, and CSS builds failed on hosts whose optimizer caches the build request.GTPERF_SAFE_MODE in wp-config.php and every HTML transformation stops and no page is served from or written to the cache, without changing a single setting or touching the drop-in. It is the answer to "something looks wrong and I cannot tell which option did it".rel="alternate stylesheet" alone. Generation now happens in the background rather than in a visitor's page load, and the result is reused across pages that share a template. Measured on a real page: 320 KB down to 101 KB.wp_revisions_to_keep on every site that activated the plugin, whether or not the database module was enabled, so posts lost revision history that could not be recovered.X-GT-Performance-Bypass request header. It was never signed despite its internal name, so any client could force a full uncached render on every request.:focus-visible and :focus-within rules were dropped as unused.GTP_ and gtp_ prefixes to GTPERF_ and gtperf_. Constants set in wp-config.php and stored transients all use the new prefix and the old names are no longer read.