long time listener, first time caller.

I'm having some issues getting localisation setup on my homestead/vagrant craft 2 site. I'm running into issues, I believe, with the craft cache when I try to visit a localised url I have set up.

I've been following the guide here, but haven't been able to have any luck with it.

I am using the folder structure in my public folder as follows


My config/general.php file is like this,

    define('URI_SCHEME', (isset($_SERVER['HTTPS'] ) ) ? "https://" : 
    define('BASEPATH',     realpath(dirname(__FILE__) . '/../'));

    return array(

    '*' => array(
      'appId' => 'app',
      'validationKey' => getenv('VALIDATION_KEY'),
      'devMode' => true,
      'backupDbOnUpdate' => false,
      'omitScriptNameInUrls' => true,

      'siteUrl' => array(
         'en' => 'http://example.test/',
         'es' => 'http://example.test/es/'
      'cacheMethod' => getenv('CACHE_METHOD'),

      'environmentVariables' => array(
        'basePath' => BASEPATH,
        'siteUrl'  => SITE_URL



My public/es/index.php file is pointing to the correct craft folder and has a define(CRAFT_LOCALE, 'es'). I'm stuck as how to progress and any pointers or tips are very appreciated
Heres a screen shot of the actual error on example.test/es
enter image description here

  • Is there anything else in your config/general.php file? If so, can you edit the question to share the whole thing?
    – Brad Bell
    Nov 2 '18 at 22:13

My guess is this is the cause:

'cacheMethod' => getenv('CACHE_METHOD'),

getenv('CACHE_METHOD') is probably returning null because that environment variable isn't being set like you expect or its set to an unknown caching driver.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.