First let’s start with the correct location in your wordpress installation:
public_html > wp-content > mu-plugins > wp-stack-cache.php
The code you will need to add into wp-stack-cache.php, is:
<?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();