A Chassis extension to install and configure memcached on your server.
-
Add this extension to your extensions directory
-
Run
vagrant provision
-
Set up your
content/object-cache.php
to point to the memcacheobject-cache.php
. This is not done automatically, as Chassis never touches your content directory, but it's super simple to set up:<?php if ( ! empty( $GLOBALS['memcached_servers'] ) ) require_once dirname( ABSPATH ) . '/extensions/memcache/object-cache.php';
(Note that this also ensures the extension was loaded successfully.)
-
Create a
local-config.php
file inextensions/memcache
then configure it:$memcached_servers = [ "hostname:11211" ];
$memcached_servers = [ [ '127.0.0.1', 11211 ] ];
-
Make sure you set
define( 'WP_CACHE', true );
in your rootlocal-config.php
.