I moved my system folder above the root and was updating the database.php file and was confused about the correct path for one of the settings.

Should it be:

$db['expressionengine']['cachedir'] = '/nfs/c10/h06/mnt/143832/domains/website.org/html/system/expressionengine/cache/db_cache/';


$db['expressionengine']['cachedir'] = '/nfs/c10/h06/mnt/143832/domains/website.org/system/expressionengine/cache/db_cache/';


2 Answers 2


If the root of your site is "/nfs/c10/h06/mnt/143832/domains/website.org/html/", the right option is the second one.

  • I am just wondering if cache directory is above the root or "public html", will it be still writable? Jun 11, 2013 at 5:19
  • Hi, @BhashkarYadav! In all server I had permission to move the system directory above the root, the folder was writable too. And I never had to use 777. 755 for directories and 644 for files did the job.
    – Sobral
    Jun 11, 2013 at 10:40
  • I have a couple of additional questions. In looking through my site I do not see a folder "db_cache" at the specified path. Just ee-version, magpie_cache, and page_cache. 1. What does this line of code do? 2. Do I need to create the folder manually?
    – cscott
    Jun 17, 2013 at 18:40
  • @cscott, all subfolders of cache are created by the EECMS itself.
    – Sobral
    Jun 17, 2013 at 19:25

I'd look to make it a little more dynamic (and legible) by using APPPATH:

$db['expressionengine']['cachedir'] = APPPATH."cache/db_cache/";

You still need to set 777 permissions on the cache/ directory but it will be writable when placed above the webroot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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