Ahmad Naser Turnkey Ecosystem Ahmad Naser
July 13, 2023

Stack Caching Plugin

Published in the Ahmad Naser ecosystem. Estimated reading time: 1 minute.

Open your shared greenbackend hosting panel
inside file manager find your wp-content and create/open mu-plugins folder
create a file
wp-stack-cache.php

and save it with the following code

<?php

/**
 * Plugin Name:       StackCache
 * Plugin URI:        http://cache.stackcp.com/
 * Description:       Wrapper to include the Stack Cache Plugin Library 
 * Author:            Stack CP
 */

// If this file is called directly, abort.
if ( ! defined( "WPINC" ) ) die;

// Load and run
foreach ( ["/../../../wp-admin/includes/file.php", "/../../wp-admin/includes/file.php"] as $path ) {
        $full_path = plugin_dir_path(__FILE__) . $path;
        if ( file_exists($full_path) ) {
                require_once($full_path);
                define( 'PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
        }
}
require "/usr/share/php/wp-stack-cache.php";
$wpsc = new WPStackCache();

Leave a Reply

Your email address will not be published. Required fields are marked *