007AJ Performance and Caching — Documentation

Guide to installing, setting up and using 007AJ Performance and Caching 1.0.1 for WordPress.

Contents

1. Installation

Requirements: WordPress 6.3 or newer and PHP 7.4 or newer. Multisite networks are not supported.

007AJ Performance and Caching cannot be active together with Safe Speed Cache: activate one or the other. Your settings are shared and kept when you switch.

From a zip file

  1. In WordPress, go to Plugins → Add New → Upload Plugin.
  2. Choose 007aj-performance-caching-1.0.1.zip and click Install Now.
  3. Click Activate. Nothing on your site changes yet.

2. Getting started

  1. Open 007AJ Performance and Caching in the dashboard and read the Setup check.
  2. If it reports nothing risky, press Enable page cache. If it reports a problem (another cache plugin, a foreign advanced-cache.php, a host that already caches pages, a read-only wp-config.php, a multisite network), nothing is changed and you are told why.
  3. Open your site in a private window and look at the response header X-AJPC-Cache: the first visit is MISS, the next is HIT.
If you ever have a problem, press Safe mode. If wp-admin is out of reach, create an empty file wp-content/ajpc-safe-mode.flag (or add define( 'AJPC_SAFE_MODE', true ); to wp-config.php) and everything switches off on the next page load.

3. Page cache

4. Safety, backups and Safe mode

5. Optimize

Everything on the Optimize tab is off until you choose. Safe minifies HTML, CSS and JavaScript and removes emoji scripts. Balanced adds deferred JavaScript, lazy-loaded images and iframes, and query strings removed from asset addresses. Each preset can be undone with one click, and Turn all optimizations off is always on the same screen.

6. Advanced speed

On the Advanced speed tab. Every option is off until you turn it on, and all of them are skipped for logged-in users, the admin area, page-builder editors, previews, feeds, REST and AJAX.

7. Images

8. Database clean-up

On the Database tab you pick what to remove: post revisions, auto-drafts, posts and pages in the trash, comments in the trash, spam comments, expired transients, orphaned post meta and orphaned comment meta. Press Count first: a dry run that changes nothing. Then tick the kinds, confirm that you have a database backup, and press Delete.

A deletion cannot be undone, and the plugin does not make a database backup. Keep your own backup (from your host or a backup plugin).

Revisions, auto-drafts, trashed posts, trashed comments and spam are removed only when older than the number of days you set (revisions and auto-drafts: at least 1 day). Published content, approved and pending comments, the Media Library and private content types are never touched.

Scheduled clean-up and table optimizing

A schedule (daily or weekly) removes only the kinds you tick and only items older than the days you set; the last 10 runs are logged. It is off until you switch it on and tick at least one kind. Table optimizing runs OPTIMIZE TABLE on this site's tables that have at least 1 MB and 5% unused space, by button or on the schedule. Scheduled deletions cannot be undone either.

9. Extras

10. CDN and purge

CDN address rewrite

Points the addresses of static files at the CDN address you enter. Default file types: jpg, jpeg, png, gif, webp, avif, svg, ico, css, js, woff, woff2, ttf, otf, eot, from the folders wp-content and wp-includes; you can edit the lists of folders, file types and exclusions. It rewrites images, srcset, video and audio, stylesheet and preload links, classic script addresses and url() values in inline styles. Links to pages, text inside scripts, module scripts, scripts or stylesheets with an integrity hash and the contents of CSS files are not changed. The admin area, previews and page-builder editors always get the normal addresses. Your CDN must fetch the files from your site under the same paths (a pull zone). The plugin never contacts the CDN.

Cloudflare purge

When the plugin removes cached pages it can ask Cloudflare to drop its copies of the same addresses, or everything. You enter an API token with the permission Zone → Cache Purge → Purge for one zone. Use Test connection first.

Host and server caches

When the plugin purges it can also call the purge function of Kinsta, WP Engine, SiteGround, Cloudways (through the Breeze plugin) or LiteSpeed Cache (or send the LiteSpeed purge header), and send HTTP PURGE requests to your own site's address for Varnish or nginx caches that accept them. Kinsta and Cloudways are purged only when the whole cache is emptied; the other hosts also purge single pages. These integrations follow the hosts' public documentation. Pantheon and Flywheel are detected and shown, not purged.

11. Object cache

Installs a persistent object-cache drop-in for a Redis or Memcached server that you run. The plugin does not install either server and uses plain sockets, so no PHP extension is needed.

12. Web Vitals

Off until you switch it on. For the share of visits you choose, a script in the visitor's browser measures LCP, the longest interaction, CLS, FCP and TTFB and sends those five numbers and the window width to your own site once, when the visitor leaves the page. It is not loaded for logged-in users, and visitors whose browser sends “Do Not Track” or “Global Privacy Control” are not measured. Your site stores only daily counts per value range and per small, medium and large screen, for 90 days, with a history chart. No page address, IP address, browser name or identifier is stored and no cookie is set or read. Interaction time is approximated by the longest interaction and the 75th percentile is estimated from value ranges. Anyone can send numbers to the route, so the figures are an indication, not proof. Delete all collected numbers removes them.

13. Privacy and personal data

By default the plugin collects no visitor data, sets no cookies and stores no IP addresses. Cached pages are stored only for visitors who are not logged in and have no cart, comment or password cookie.

For logged-in administrators it keeps a “notice dismissed” flag and short-lived result messages linked to their user ID. WordPress's Export Personal Data and Erase Personal Data tools include and remove them. The plugin adds suggested text under Settings → Privacy → Policy Guide that covers the services in section 17, the settings file for the object cache and Web Vitals.

Stored in your database: settings and the Cloudflare API token (not autoloaded, never shown again; deleted with “Remove token and settings” or when you delete the plugin with the data option ticked). Optimized files are under wp-content/cache/ajpc-assets/.

14. Deactivating and deleting

Deactivate: removes the drop-in, the WP_CACHE line, the .htaccess rules and the cached pages, the object-cache drop-in (restoring any backed-up drop-in) and the optimized files. Your settings stay.

Delete: keeps your settings and backups unless you tick Also delete all settings and backups on the Page cache tab first (off by default). Image originals saved in wp-content/ajpc-backups/images/ are part of those backups.

15. What it does not do

16. Troubleshooting

"Enable page cache" was blocked

The Setup check lists the reasons. Fix the item (for example deactivate the other cache plugin) and try again. Nothing was changed.

An optimization broke something

Press Undo or Turn all optimizations off on the Optimize tab, or add the script or page to the exclusions. If you cannot open wp-admin, create the empty file wp-content/ajpc-safe-mode.flag.

I do not like the result of image compression

Press Restore original on the image in the Media Library, or Restore all originals on the Images tab. A file you edited after optimizing is never overwritten by a restore.

The preload does nothing

It needs the page cache to be on and Safe mode to be off, and it runs on WP-Cron. If WP-Cron is switched off on your site, use the Run one step now button or your own cron job.

I use a multisite network

Multisite is not supported. The plugin will not enable page caching on a network and the other features were written for single sites only.

A file does not load from the CDN

Add it to the CDN exclusions or switch the rewrite off. Fonts requested from inside a CSS file keep their address, because CSS files are not rewritten.

Redis or Memcached shows as not reachable

WordPress keeps working. Check the server address and port and run the connection test again; the Object cache tab shows the state.

The page looks unstyled for a moment

Switch off Critical CSS, or paste CSS for that page type in the box on the Advanced speed tab.

17. External Services & Data

The plugin connects to an outside service only when you turn the matching feature on, and sends nothing until then.

ServiceUsed forWhat is sent and whenTerms and privacy
Google Fonts (fonts.googleapis.com, fonts.gstatic.com), Google LLCHosting fonts locally, only if you turn on “Host Google Fonts locally”Your server requests the font stylesheet and font files once per font address, in the background, with a standard browser identification text. Visitor data is not sent; the request comes from your server. A failed download is not retried for an hour.Terms · Privacy
Cloudflare API (api.cloudflare.com), Cloudflare, Inc.Purging Cloudflare's copies, only after you save an API token and tick a purge optionYour API token (Authorization header), your Zone ID, and either a list of this site's page addresses (30 per request) or the instruction to purge everything; your site's domain name when it looks up the zone. When the plugin purges, when you press Test connection or the purge button. No visitor data.Terms · Privacy

Servers you run yourself are not outside services: the Redis or Memcached address you enter, HTTP PURGE requests to your own site's address, the setup self-check and the optional preload (your own pages). Nothing is sent to 007aj.com or anyone else by those. The plugin does not track visitors and sets no cookies.

18. Support

Email admin@007aj.com. Please include the plugin version (shown under Plugins) and what you expected to happen.

← Back to 007AJ Performance and Caching