2 min read Sep 26, 2026

How to Restore the StackCache Plugin in WordPress

Accidentally deleted the StackCache must-use plugin from your WordPress site? Recreate the wp-stack-cache.php file in mu-plugins with the code in this guide.

FimuroHost Team

FimuroHost Team

Technical Writer

Share Article

WordPress sites on FimuroHost Cloud Hosting include StackCache, a small must-use plugin that connects your site to the platform's built-in caching. It sits in the mu-plugins folder, so it doesn't appear in your normal plugin list and is easy to delete by accident when cleaning up files. If that has happened, you can put it back yourself in a couple of minutes.

Where the file belongs

public_html/wp-content/mu-plugins/wp-stack-cache.php

If your WordPress install is in another folder, use that folder's wp-content instead.

Restore StackCache

  1. Log in to your FimuroHost client area at app.fimurohost.com.
  2. Go to Services and select your Cloud Hosting plan.
  3. Click Login to Control Panel / StackCP. StackCP opens for that website, already signed in.
  4. Open File Manager (or connect over FTP) and go to public_html/wp-content.
  5. If there is no mu-plugins folder, create one.
  6. Inside mu-plugins, create a new file named wp-stack-cache.php.
  7. Paste in the code below exactly as shown and save the file.
<?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();

Check that it worked

  • In your WordPress dashboard, go to Plugins > Must-Use. StackCache should be listed.
  • Load your site in a private browser window to confirm it displays normally.

Tips

  • Make sure the file starts with <?php and has no spaces or blank lines before it, or you may see "headers already sent" warnings.
  • If your site shows an error after saving, rename the file (for example to wp-stack-cache.php.off) to disable it and contact us.

Need help?

Our support team is happy to take a look. Open a ticket at app.fimurohost.com/submitticket.php or message us on WhatsApp at 01818160926.

Categories

FimuroHost Team

Written by

FimuroHost Team

Technical Writer