Question

For a PHP CMS (wolfCMS in this case, but I imagine the question is relevant for any PHP CMS), and from a performance and backup point of view, where is better to store template data (layout files)?

In a database entry, or in a .php file in the file system. Or even somewhere else all together?

Was it helpful?

Solution

In general, databases will win everytime you need to find data in a flexible way. Filesystems will work anytime you need to find something in a fixed way (i.e., a pathname).

Would you be using the analogue of a file name as the index in your database? Or do you need to filter it in various ways based on a number of criteria in order to pick the appropriate template?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top