Templates, partials and template variables are automatically stored as files since EE4. But they are also stored in the database (in the tables exp_global_variables, exp_templates, exp_snippets - note that the table-names still refer to the old identifiers from EE2: Snippets, Global Variables).

If you delete e.g. the file of a template variable via ftp the variable will be recreated (using the the according entry in the DB). So the right way is to delete the template variable via the Control Panel -> Templates.

I had a serious issue with a template variable that recreated itself infinitely because its name was too long (reported here on Github). This variable still is shown in the CP, in the DB and as file. I don't dare to delete it via the the CP because I fear that the infinite loop will run again.

How can I delete this template variable completely, safe and forever? I am thinking the best way would be deleting first the according entry in the database and then deleting the file via ftp.

Thanks for any contribution!

1 Answer 1


I'd turn on debugging, then add and delete a template variable (in the CP), paying attention to all the SQL DELETE statements. Then basically duplicate those for your use.

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.