Anti-Cache Kit — Full changelog

For each release, see the entries below. The latest version is always at the top.
The current release notes also live in readme.txt under "== Changelog ==".

= 4.3.0 =
* New: WP-CLI commands to drive the kit from the terminal: wp anticache status, flush, maintenance on|off|status, on, off and expire
* New: auto-deactivation timer. Choose 2, 6, 12 or 24 hours and the kit deactivates itself and reverts everything, so it is not left active by mistake. It runs on WP-Cron
* New: debug log viewer on the settings page, with the last 200 lines of debug.log and a button to empty it. On a network only network administrators see it, because the log holds errors from every site
* New: optional debug constants, all off by default: SAVEQUERIES for Query Monitor, CONCATENATE_SCRIPTS off, WP_DEBUG_DISPLAY on and WP_DISABLE_FATAL_ERROR_HANDLER
* New: purges the page caches of WP Engine, Pantheon and Batcache (Pressable), and says which hosting caches it purged
* Improved: maintenance mode now lets anyone who can edit content see the site, so editors, authors and contributors can keep working. Customers, subscribers and visitors see the maintenance page. The settings page and the readme now say that the REST API and XML-RPC stay available during maintenance
* Improved: on a network, wp-config.php and the .htaccess go back as they were when the last site that changed them deactivates the kit, whoever deactivates it. Before, a subsite administrator deactivating the kit left WP_DEBUG and the no-cache rules on the whole network, and a network administrator deactivating it on one site undid them for the other sites still using it
* Improved: the settings page now says when WP_DEBUG, WP_CACHE or another debug constant is defined outside wp-config.php and the kit could not change it, and the kit's own definitions no longer raise a "Constant already defined" warning in that case
* Improved: the Varnish setting has its own Save button. Before, it was only saved along with another action
* Improved: the kit no longer spends a database query on every request on settings that did not exist yet, and deactivating or deleting it on a network cleans its settings on every site
* Fix: the SiteGround Optimizer, LiteSpeed Cache, Cloudflare and Kinsta purges did nothing, because those APIs had changed. They use the current ones now, and the WP Fastest Cache purge no longer starts a second copy of that plugin
* Fix: on a network, a cache plugin active for the whole network was left half deactivated: its deactivation routine ran while it stayed active. The kit now leaves it alone and says a network administrator has to deactivate it
* Fix: writing wp-config.php reset hardened permissions such as 0600 or 0640 to 0644, and replaced a symbolic link with a regular file. Both are kept now
* Fix: if writing wp-config.php failed halfway, for example with a full disk, the temporary copy with the database credentials could stay in the site root. It is always deleted now
* Fix: deactivating the kit changed blank lines in wp-config.php and the .htaccess outside its own block. Both files now go back exactly as they were, and a .htaccess the kit created on a site that had none is removed again
* Fix: the confirmation after Flush now or switching maintenance mode from the settings page never showed
* Fix: the status card showed WP_CACHE as ENABLED when it was not set at all
* Fix: on the settings page, admin notices landed inside the header, squeezed into narrow columns next to the title
* Fix: closing the red warning shown on production sites was not remembered, so it came back on the next screen. It is now remembered for each user, and the warning shows again when the kit is activated again, or after the site has run as another environment and returns to production. The red admin bar dot and the status card stay as they were
* Fix: removed the Tested up to line from the plugin file header, which Plugin Check reports as an error. The value stays in readme.txt
* Fix: the readme and the activation notice promised more than the kit does: not every cache plugin is flushed before it is deactivated, only the Object Cache 4 Everyone drop-in is removed, and deactivated plugins stay off after the kit is deactivated

= 4.2.2 =
* Fix: on a multisite network, the administrator of any subsite could rewrite the wp-config.php and the .htaccess of the network root and delete a cache drop-in shared by every site. Both files hang off a root that is one directory for the whole network, while plugin activation is per site, so manage_options was enough to reach them. Writing them now requires the network capability, and a subsite administrator is told why debug mode and the server rules stayed off instead of watching them fail silently. Single sites are unaffected: there manage_options is still the right capability
* Fix: the settings panel said wp-config.php and .htaccess were restored from backup, which stopped being true in 4.2.0, when reverting moved to markers and on-disk backups were removed

= 4.2.1 =
* Improved: compatibility with WordPress 7.1, including the persistent toolbar that now shows the Anti-Cache Kit menu in the Site Editor
* Improved: cache busting now also applies to script modules, so Interactivity API and block view scripts are no longer served from the browser cache while debugging

= 4.2.0 =
* New: nginx and Caddy detection. The kit no longer writes dead .htaccess rules where they have no effect; it shows N/A and offers an equivalent nginx snippet to copy
* New: production-environment warning (dismissible notice, red admin bar dot, and status card) when WP_ENVIRONMENT_TYPE is production
* New: opt-in Varnish purge (best-effort PURGE/BAN to the site root, only when Varnish is detected)
* New: uninstall.php that removes the plugin options and any legacy backup directory
* New: cache drop-in removal so Object Cache 4 Everyone actually stops (its object-cache.php drop-in is removed on deactivation)
* New: detection of more plugins (Nginx Helper, NitroPack, SpinupWP, Docket Cache, Object Cache Pro, EWWW Image Optimizer, ShortPixel)
* New: the status card now shows the environment and whether wp-config.php is writable
* Improved: wp-config.php and .htaccess changes are reverted via markers and are no longer copied to a web-accessible backup folder, removing the risk of exposing database credentials. Any backup directory from older versions is deleted
* Improved: Query Monitor is never deactivated, and the kit reports its actions to Query Monitor
* Improved: wp-config.php is validated before writing and written crash-safe (temporary file then move), with more robust handling of conflicting definitions and a safer insertion point
* Improved: the activation notice now requires the manage_options capability, the admin panel uses the WordPress Filesystem API, and error-suppression operators were removed for a clean Plugin Check
* Improved: synchronized the AyudaWP recommendations banner with the current catalog
* Improved: minimum WordPress raised to 5.5 to use the native environment detection (wp_get_environment_type)
* Fix: deactivation could remove WP_DEBUG, WP_CACHE or SCRIPT_DEBUG definitions the user had set themselves. Only the plugin's own block is removed now
* Fix: corrected wrong plugin display names (Clearfy Cache, DietPress)
* Fix: the maintenance page auto-reload now matches the 30-minute Retry-After value

= 4.1.0 =
* Fixed duplicate definitions in wp-config.php causing PHP notices on repeated activations
* Fixed orphaned if ( ! defined() ) blocks and blank lines in wp-config.php after activation
* Fixed wp-config.php restore losing user's original debug and cache definitions
* Fixed MIME type console errors caused by cache-busting applied to non-asset URLs
* Conflicting definitions are now commented out with [Anti-Cache Kit] marker instead of deleted
* wp-config.php restore is now a plain file copy from backup with no processing
* WP_DEBUG_DISPLAY set to false: errors go to debug.log instead of displaying on screen
* SCRIPT_DEBUG added to managed constants: commented out on activation, set to true for development
* Timestamped backups for both wp-config.php and .htaccess (e.g. wp-config-20260402-143025.bak)
* Backups preserved on deactivation for reference (removed only on plugin deletion)
* Fallback restore that uncomments marked lines when no backup is available
* Legacy backup filename detection for upgrades from older versions

= 4.0.1 =
Tested up to WordPress 7.0

= 4.0.0 =
* Renamed from "Anti-Cache Emergency Kit" to "Anti-Cache Kit"
* Complete UI redesign with dark card theme on WordPress default background
* Added optimization plugin deactivation (Perfmatters, FlyingPress, WP Asset CleanUp, Object Cache 4 Everyone, WPO Tweaks, Clearfy)
* Added server-level .htaccess anti-cache rules (SiteGround env vars, browser cache headers, ETags, mod_expires)
* Added automatic .htaccess backup and restoration on deactivation
* Added early cache-busting headers at plugins_loaded for hosting-level bypass
* Added CDN/proxy bypass headers (X-Accel-Expires, Surrogate-Control, Vary)
* Detailed, AJAX-dismissible activation notice showing all changes made
* Unified admin bar indicator with maintenance toggle and settings dropdown
* All CSS and JS moved to external files in /assets/ directory
* Removed all emoji from code and translation strings
* Self-contained maintenance page with site name as heading and aggressive cache prevention
* Added support for Powered Cache, Comet Cache, and Swift Performance
* Added Kinsta hosting cache clearing
* Implemented ayudawp_anticache_cache_plugins filter
* Added AyudaWP promotional banner with plugin recommendations
* Fixed maintenance page not visible in incognito
* Fixed admin notice persistence
* Improved responsive layout for all screen sizes

= 3.0.5 =
* Updated Cloudflare integration to use new namespace (Cloudflare for WordPress v4.14.0+)
* Maintained backwards compatibility with legacy namespace

= 3.0.3 =
* Added automatic backup of wp-config.php before modifications
* Added WP_CACHE = false to disable WordPress cache

= 3.0 =
* Added comprehensive admin management panel
* Added optional maintenance mode for non-logged users
* Added support for more cache plugins
* Added object cache clearing

= 1.0 =
* Initial release
