I'm working on EE2 theme and I can't find solution how to force EE use templates directly from the file system.

Generally I want to disable database templates while I'm working on theme, to get development quickly.

Is it possible? Thanks


2 Answers 2


That would be the save templates as files feature. Once you've configured a template path you can save individual templates as files or you can sync all of your templates to file via the Templates > Synchronize Templates page.

Once you've done that any changes you make to the template files will take effect immediately, without you needing to manually sync them to the DB.

  • Thanks. Sync creates dir name 'default_site' inside base templates dir. is it possible to change saving/sync dir from 'default_site' to 'mytemplatename' ?
    – Artem O.
    Commented Jan 16, 2013 at 11:33
  • 'default_site' represents your site name as set in EE preferences or in config.php You can change that name so something else, of course. You should also be aware that even if you save templates as files, there needs to be a database record for each template. Commented Jan 16, 2013 at 14:16
  • Thank you, Yuri. How can I add all templates and template groups to the database?
    – Artem O.
    Commented Jan 16, 2013 at 17:00
  • I'm not entirely clear what you're asking but you can fully re-sync the templates back to the DB via the Synchronize Templates page.
    – Dom Stubbs
    Commented Jan 18, 2013 at 12:49

I would recommend setting the save template as text files (as suggested by Dom) option in you config file. There is a good tutorial about putting your config file to better use here.

In a nutshell though it's this:

$config['save_tmpl_files'] = "y";
$config['tmpl_file_basepath'] = "/path/to/your/templates/";
  • Thank you. Is it possible to add other template groups to the synchronization not only default* and _assets ?
    – Artem O.
    Commented Jan 16, 2013 at 11:40

Your Answer

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

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