I am working locally and occasionally have to push my files up to staging server,

The problem is when I replace the database a variable gets overwritten and breaks my layout.

Server path to site's templates (in Template ManagerGlobal > Template Preferences)

This is not in the config.php file but if I could set it there good, either that or exclude the table when I export the database.


2 Answers 2


Not all configurable options are in the default config file. This is one of them.

But the good news is that you can set an override in your site's config file just by adding it the following:

$config['tmpl_file_basepath'] = '/path/to/your/templates';

It is possible to override many things in this way, to get the array key examine the ID of the input for that item in the control panel.

You should definitely look at using Focus Labs Master Config which allows you to specify different configurations (including database set ups, file paths, templates etc) for multiple domains from which a site might be served. It's a god-send for situations like this.


this will be saved in database (exp_sites -> site_template_preferences) column but u can't see it because the data encrypted.

any way u can over-ride it with $config['tmpl_file_basepath'] in your config file.

I think this link will be useful.


check it an let me know.

Note: I always use http://devot-ee.com/add-ons/reelocate plugin when I move my sites it's very useful.


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.