| 开发者 | wonderfulplugins |
|---|---|
| 更新时间 | 2026年11月4日 23:30 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv3 |
| 版权网址: | 版权信息 |
advanced-cache.php drop-in answers cached requests before WordPress loads.define( 'WP_CACHE', true ); to wp-config.php.X-Wonderful-Geo-Page-Cache says MISS on the first request and HIT on the next one.From a GeoLite2-Country database on your server. If WooCommerce geolocation is enabled, its database is used automatically; otherwise enter the path of any MaxMind DB file. Nothing is sent to an external service.
If the web server already puts the client address into REMOTE_ADDR (mod_remoteip, as in the official WordPress Docker image), keep REMOTE_ADDR — mod_remoteip removes the forwarded header it has read. Otherwise choose the header that carries the client address (for example HTTP_X_FORWARDED_FOR). If the configured source is missing on a request, that request is not cached rather than filed under an unknown country.
The prewarmer requests the page from the site itself with a header signed by a key derived from the salts in wp-config.php, which only the site knows and which is never written to a file. The drop-in accepts that header only with a valid signature and then treats the request as coming from an address in the wanted country (taken from the GeoLite2 database), so WordPress renders exactly what a visitor from there would get. It sends at most two requests a second.
In wp-content/uploads/wonderful-geo-page-cache/: the cached pages, the configuration the drop-in reads and the prewarm state, all as plain data files, never as code. An .htaccess file closes the folder to web requests on Apache and LiteSpeed. On nginx, add a rule such as location ^~ /wp-content/uploads/wonderful-geo-page-cache/ { deny all; }.
No. Only one plugin can own advanced-cache.php; the plugin never overwrites another plugin's drop-in and tells you when one is installed.