Folder structure
A guide to the Blog Lite 2 folders and files: where the code, templates, data and uploads live, and which files are safe to edit.
Blog Lite 2 is organised so you can find things easily. Here is what each folder is for.
blog/
index.php public website entry point
config.php a few technical options
admin/ admin panel entry point and its templates
app/ the code ("engine")
classes/ one small class per job
controllers/ one file per kind of page
themes/default/ public website templates
assets/ CSS and JavaScript
data/ your XML data files
uploads/ your uploaded images
What is safe to edit?
| Folder or file | Purpose | Edit it? |
|---|---|---|
config.php | Time zone, debug mode, folders, upload size. | Yes. See config.php options. |
themes/default/ | HTML templates for the public site: layout.php, home.php, post.php and more. | Yes. See Customising the design. |
assets/css/site.css | Styles of the public site. | Yes. |
admin/views/ | Templates of the admin panel. | Rarely. |
app/classes/ | The engine: storage, posts, comments, AI, login. | Only if you know PHP. |
data/ | Your content in XML files. | Back it up, but do not edit while the site is in use. See XML data files. |
uploads/ | Images you upload. | Back it up. |
The engine in plain words
| Class | Job |
|---|---|
Storage | Reads and writes the XML files. The only file that knows the XML format. |
PostRepository | Finds, saves and deletes posts. |
CommentRepository | Comments and replies. |
CategoryRepository | Categories. |
MessageRepository | Contact form messages. |
Settings | Blog options saved from the Settings page. |
Auth | Login, sessions and form protection. |
AiGenerator | Talks to Groq, DeepSeek or OpenAI. |
ImageUploader | Saves uploaded images safely. |
View | Shows a template inside a layout. |
Protected folders
The data, app and admin/views folders contain .htaccess files that block direct downloads on Apache. On Nginx you must add the rules yourself. See Security.
Last updated