LiteBLOG
LiteBLOG is a super lightweight blog program with topic discussions, board management, user management, content moderation, audit logs, and template/extension management.
Why it's good
- Tiny and extremely lightweight: the source is only about 100KB, with no piles of redundant code or bloated dependency packages.
- Very low resource usage. Fast page loads: it runs smoothly even on a cheap shared host or a small server, with minimal load pressure.
- Simple deployment: low requirements — just PHP + MySQL, upload the source and you're up and running quickly. Low barrier to entry.
- Templates + extensions: built-in template management and extension hooks, so you can change the UI or add features as needed without touching the core code.
- Open source: the source is open, you can self-host it, and you control your own data. Clean, minimal interface: mobile-friendly out of the box, no cluttered extra components.
Features
- Article topics, replies, editing, and pagination
- Visible/hidden boards and ordering management
- Admin panel: content, users, boards, templates, plugins, extension review, auditing, and site settings
- Login sessions, CSRF protection, HTTPS origin validation, and action auditing
- Safe escaped Markdown rendering
- File caching plus cache invalidation for themes, boards, and topic lists
- Structural validation, signed manifests, and a review process for the internal extension marketplace
- Update checks pinned to the official GitHub repo, with confirmation before applying program updates
Requirements
- PHP 8.0 or higher
- MySQL 8.0+ or MariaDB 10.6+
- PHP extensions:
pdo_mysql,mbstring - The extension marketplace and online updates additionally need:
openssl,zip,curl - An HTTPS website
Installation
- Upload the project files to your website's program directory.
- Make sure the PHP web process can write to
private/,cache/, andlogs/in the program directory. - Create an empty database and a dedicated database user in your database panel, and grant the permissions needed to create tables.
- Configure Apache
.htaccessor set up Nginx usingnginx.conf.exampleas a reference. - Visit the installer over HTTPS:
https://example.com/install
If the program is deployed in a subdirectory, for example /forum/:
https://example.com/forum/install
After installation finishes, the database config and install lock are stored in the program directory:
private/config.php
private/install.lock
Don't expose private/ to web access. The Apache and Nginx rules shipped with the project already deny that directory.
Database permissions
The application database user needs at least the following permissions on the target database:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX, REFERENCES, DROP
ON `forum_db`.* TO 'forum_app'@'WEB_SERVER_IP';
WEB_SERVER_IP must be the web server source address as MySQL/MariaDB actually sees it. IPv4, IPv6, localhost, and 127.0.0.1 are all different grant matches.
Admin panel
After logging in as an administrator, go to:
/admin
The admin panel uses a fixed system layout and doesn't depend on the front-end theme. From there you can manage:
- Topics and reply content
- User roles and status
- Discussion boards
- Templates and plugins
- Extension review
- Official update checks
- Audit logs
- Site settings
Program updates
The update source is pinned to:
https://github.com/Lfreepayzz/LiteBLOG
In the admin panel under "Extensions & Updates" you can check the latest commit on the main branch. When a new version is found, the administrator has to confirm the update; the program backs up the managed source files that will change before replacing them.
Things that won't be overwritten by admin updates:
private/
uploads/
cache/
logs/
database
The update repo must contain the complete project source, at minimum including:
index.php
app/
database/
languages/
scripts/
templates/
Security and operations
- HTTPS must be enabled in production.
- Until installation is complete, restrict
/installto trusted admin networks only. private/must be denied access by the web server.- Don't install unreviewed PHP templates or plugins directly through the web UI.
- Keep database and file backups before updating.
- Periodically run the cleanup script via CLI:
License
This project is licensed under the Apache License 2.0. See LICENSE for details.
LiteBLOG
LiteBLOG 超级轻量博客程序,提供主题讨论、分区管理、用户管理、内容审核、审计日志、模板和扩展管理功能。
优点
- 体积极小,极致轻量化:源码仅 100KB左右,没有大量冗余代码、臃肿依赖包,
- 占用资源极低。 访问速度快:低配虚拟主机、小服务器也能流畅跑,负载压力小。
- 部署简单:PHP+MySQL 环境要求低,上传源码、即可快速搭建,上手门槛低。
- 支持模板 + 扩展机制:自带模板管理、扩展接口,方便改界面、按需加功能,不用改动核心代码。
- 开源:源码开放、私有化部署,数据自己掌控, 界面清爽简约:原生适配移动端,没有繁杂多余组件。
功能
- 文章主题、回复、编辑与分页
- 可见/隐藏分区及排序管理
- 管理员后台:内容、用户、分区、模板、插件、扩展审核、审计与站点设置
- 登录会话、CSRF 防护、HTTPS 来源校验和操作审计
- Markdown 安全转义渲染
- 文件缓存与主题、分区、主题列表缓存失效
- 内部扩展市场的结构校验、签名清单和审核流程
- 固定 GitHub 官方仓库更新检查与确认式程序更新
环境要求
- PHP 8.0 或更高版本
- MySQL 8.0+ 或 MariaDB 10.6+
- PHP 扩展:
pdo_mysql、mbstring - 扩展市场与在线更新额外需要:
openssl、zip、curl - HTTPS Web 站点
安装
- 将本项目文件上传到网站程序目录。
- 确认 PHP Web 进程可写入程序目录中的
private/、cache/和logs/。 - 在数据库面板创建空数据库和独立数据库用户,并授予建表所需权限。
- 配置 Apache
.htaccess或参考nginx.conf.example配置 Nginx。 - 使用 HTTPS 访问安装页面:
https://example.com/install
如果程序部署在二级目录,例如 /forum/:
https://example.com/forum/install
安装完成后,数据库配置和安装锁保存在程序目录下:
private/config.php
private/install.lock
不要将 private/ 暴露给 Web 访问。项目提供的 Apache 和 Nginx 规则已拒绝该目录。
数据库权限
应用数据库用户至少需要目标数据库的以下权限:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX, REFERENCES, DROP
ON `forum_db`.* TO 'forum_app'@'WEB_SERVER_IP';
WEB_SERVER_IP 必须是 MySQL/MariaDB 实际看到的 Web 服务器来源地址。IPv4、IPv6、localhost 和 127.0.0.1 属于不同的授权匹配项。
后台管理
管理员登录后访问:
/admin
后台使用固定系统布局,不依赖前台主题。后台可管理:
- 主题与回复内容
- 用户角色和状态
- 讨论分区
- 模板和插件
- 扩展审核
- 官方更新检查
- 审计日志
- 站点设置
程序更新
程序更新源固定为:
https://github.com/Lfreepayzz/LiteBLOG
在后台“扩展与更新”中可检查 main 分支的最新提交。发现新版本后,管理员需要确认更新;程序会备份发生变更的受管源码文件后再替换。
不会被后台更新覆盖的内容:
private/
uploads/
cache/
logs/
数据库
更新仓库必须包含完整项目源码,至少包括:
index.php
app/
database/
languages/
scripts/
templates/
安全与运维
- 生产环境必须启用 HTTPS。
- 安装完成前限制
/install仅允许受信任的管理网络访问。 private/必须由 Web 服务器拒绝访问。- 不要通过网页直接安装未经审查的 PHP 模板或插件。
- 更新前保留数据库和文件备份。
- 定期通过 CLI 执行清理脚本:
许可证
本项目采用 Apache License 2.0,详见 LICENSE。
Translated by AI from 简体中文Original (简体中文)
可以共享、可以push的免费邮箱,更可使用自定义域名,完美契合您的各项需求。
3 replies
Sort order