0

I recently upgraded from EE2 to EE5. For my template groups and templates, I had a /templates folder that I used to save/load my templates. So the site read from that folder and not the database.

In EE5, for some reason I cannot get it to do the same, so now it is trying to load all templates from code saved in the database instead of the template files.

During the upgrade, the /templates folder was moved to /system/user/templates. I also added this to my config.php file:

$config['save_tmpl_files'] = 'y';

But that also didn't work. Anyone know how to force EE5 to read templates from files instead of database?

0

The system still the same, the template path since EE3 is different from the EE2 one. If the template code is no cached, always are read from the database.

Templates files are very useful to edit the content at your own, to edit them inside your prefered text editor, IDE, than inside the Control Panel.

When the EE system cache is used, or an other one, the templates are read from the cache to speed up the access time, so the site performances.

So, no need to worry about this problem (EE5 read from template files instead of database) if you can edit the template yourself in text editor. It's implemented from EE3 version, and many other addons as Low Variables for example, that directly saves templates, snippets, variables to files.

| improve this answer | |
0

Well, if you have created any template from Template Manager in ExpressionEngine, it always saves and read from database. As Stephane says, it only change if Caching comes into the picture.

In your case, EE5 allows to change the Template directory path if you want. So, it is possible to move your Templates to any separate folder in your public_html and manages from there. And also you have facility to change the template code from Template Manager by directly editing the template from Admin Panel.

| improve this answer | |

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.