PHPackages                             inpsyde/wp-stash - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. inpsyde/wp-stash

ActiveWordpress-muplugin[Caching](/categories/caching)

inpsyde/wp-stash
================

Powerful Object Caching Backend for WordPress

v3.4.1(1y ago)5511.3k↓50%12[1 issues](https://github.com/inpsyde/WP-Stash/issues)GPL-2.0+PHPPHP &gt;=7.1CI passing

Since Dec 4Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/inpsyde/WP-Stash)[ Packagist](https://packagist.org/packages/inpsyde/wp-stash)[ RSS](/packages/inpsyde-wp-stash/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (17)Used By (0)

WP Stash
========

[](#wp-stash)

WP Stash is a bridge between StashPHP and WP's object caching drop-in support. It enables APCu, Redis, SQLite, Memcached, and Filesystem caches, stampede protection, and group invalidation.

After installing, it will copy an `object-cache.php` file to `wp-content/` which will delegate all cache calls to its mu-plugin folder. From there, it will interface with StashPHP.

Installation
------------

[](#installation)

This plugin is a Composer package that will be installed as a `wordpress-muplugin`. As such, there are a few things to note when attempting to install it. Usually, MU-Plugins are single PHP files, sometimes accompanied by a subfolder containing more code. Since WP-Stash assumes it's living in a subfolder, it contains a lot of other dev-related stuff in its root folder.

For WP to pick up WP-Stash as an MU-Plugin, you have to do one of the following:

### Composer

[](#composer)

As a first step, simply require the package via composer

`composer require inpsyde/wp-stash`

Since this package will get installed in a subfolder. WordPress will not automatically load it on its own. The following solutions exist:

#### WP Starter

[](#wp-starter)

If you are using the awesome [WP Starter](https://wecodemore.github.io/wpstarter/) package, then everything will work automatically. It contains an MU-Loader which will take care of loading WP Stash. Note that you MUST NOT use WPStarter's drop-in functionality to copy `object-cache.php` on build time! WPStash must place the drop-in file on its own. If you want to trigger WP-Stash to create the drop-in file just run a command like `wp plugin list`.

#### WP Must-Use Plugin Loader

[](#wp-must-use-plugin-loader)

[WP Must-Use Plugin Loader](https://github.com/lkwdwrd/wp-muplugin-loader) is a standalone composer package that will take care of loading mu-plugins for you. Just require the package and follow the usage instructions from the link to set it up.

### Without Composer

[](#without-composer)

#### Direct upload

[](#direct-upload)

You can technically use WP-Stash by simply extracting all files into the `wp-content/mu-plugins/` folder. However, this is pretty dirty and we strongly discourage doing so. Instead, please look at the [WordPress Codex on MU-Plugins](https://codex.wordpress.org/Must_Use_Plugins) to find solutions for loading mu-plugins from folders.

The easiest solution is to add a `wp-content/mu-plugins/wp-stash.php` file and put the following in it:

```
