Skip to content

Instantly share code, notes, and snippets.

@geraldvillorente
Last active April 4, 2018 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geraldvillorente/c6fcdd87ed66f22e1762484d739a4404 to your computer and use it in GitHub Desktop.
Save geraldvillorente/c6fcdd87ed66f22e1762484d739a4404 to your computer and use it in GitHub Desktop.
Working with absolute path on Pantheon.

Wrong way

define( 'WPCACHEHOME', '/srv/bindings/12345678905432167890/code/wp-content/plugins/wp-super-cache/' );

Proper way

define( 'WPCACHEHOME', $_SERVER["DOCUMENT_ROOT"] . '/wp-content/plugins/wp-super-cache/');

or

if ( defined( 'PANTHEON_BINDING' ) ):
    define( 'WPCACHEHOME', sprintf('/srv/bindings/%s/code/wp-content/plugins/wp-super-cache/', PANTHEON_BINDING));
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment