I use civicrm on WPEngine hosting which does not allow php files to be generated on their live environment (if you are not logged in as admin). Because of this I generate the php files in the template_c folder while logged in as admin (for the frontend civicrm pages). This means every time a php file in the template_c folder has to be re-generated a frontend civicrm page will crash.

Can someone give me a clue how long the generated php files in the template_c folder last so I can eventually re-generate them manually and avoid frontend civicrm page crashing? (or give me a better idea how to handle this).

  • As far as I'm aware they don't have a time limit. Interesting to learn this about WPEngine - I'm working with an install hosted there. Can't say I'm impressed so far.
    – Graham
    Sep 19, 2017 at 17:32
  • I'd argue that in general WPEngine is doing the "right thing" security-wise, preventing executables from being generated on-the-fly. Smarty, which as noted below is doing the generation, is a general-purpose framework and templates can be created from "regular" user input as well (e.g. civicrm mail templates are compiled to php executables). However this is somewhat odd given that WP allows editing the theme files from within WP, which is a ridiculous thing I think personally, but it means that WPEngine is maybe a little inconsistent, unless they disable that too.
    – Demerit
    Sep 20, 2017 at 3:00
  • Oops comment edit period expired - I see you said it can be done if logged in as admin, which then means they are still being consistent, since only admin can edit the theme files. So ignore my last sentence.
    – Demerit
    Sep 20, 2017 at 3:07

1 Answer 1


It's actually compiling Smarty templates, not PHP pages. There is no timeout on how long they are valid, as the underlying templates don't change.

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.