WP Manifestindependent plugin directory
manifest / performance / sage-cache-wpe

WP Engine Sage Cache

Ensures that Sage's cache folders are present on a WP Engine environment even after restarts/reboots (GCP/AWS) and web-head cycling (AWS).

by Gart · github.com/gartwpe/sage-cache-wpe · website

2stars
1forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/gartwpe/sage-cache-wpe/archive/refs/heads/main.zip

Ensures that Sage's cache folders are present on a WP Engine environment even after restarts/reboots (GCP/AWS) and web-head cycling (AWS).

The code uses the WP Engine PWP_NAME variable (set in wp-config.php) to "know" where it is and generates a Sage cache directory accordingly - allowing copies between production/staging/development without sharing cached code.

Installation

  1. Place inside wp-content/mu-plugins/ directory.

  2. Modify the Sage theme compiled path to:

    'compiled' => '/tmp/sage-cache-' . PWP_NAME,

For example, within...

wp-content/themes/YOUR_THEME/config/view.php
wp-content/themes/YOUR_THEME/vendor/roots/acorn/config/view.php

Usage

That's it! The Sage cache directrory will automatically regenerate in /tmp/sage-cache-INSTALL_NAME/* if not already present.

Contributing

Pull requests are welcome.

License

GPL 3.0