Wren CMS 是一个极简的、单文件内容管理系统,使用 PHP 和 SQLite,无需依赖、无需构建步骤,一分钟即可建立整个网站。

Stars

24

7 天增长

暂无数据

Fork 数

0

开放 Issue

0

开源协议

MIT

最近更新

2026-07-30

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它重拾了超轻量级 CMS sNews(2004–2016)的精神,证明一个功能完整的 CMS 仍然可以塞进一个小文件,并且从头到尾都可读。

适合谁使用

  • 希望快速部署或原型的、想要极其简单 CMS 的开发者
  • 需要单一 HTML 文件主题 API 的设计师
  • 在共享主机上运行、没有 MySQL 或 Composer 的爱好者
  • 怀念 2000 年代初极简网络工具的人

典型使用场景

  • 个人博客或作品集网站,支持 Markdown 文章和页面
  • 轻量级公司信息网站,带有菜单和 RSS 订阅
  • 快速原型或 MVP,设置时间不超过五分钟
  • 教学工具,展示一个最小 CMS 的内部工作机制

项目优势

  • 零外部依赖——一个 PHP 文件,无需 Composer,无需构建步骤
  • 自动创建 SQLite 数据库,无需手动 SQL 设置
  • 内置安全:bcrypt/argon2 密码、CSRF 保护、预处理语句和 HTML 转义
  • 通过单个 theme.html 文件和清晰的模板标签实现简单主题化

使用前须知

  • 仍处于早期阶段(v0.1.0),缺少评论、图片上传、搜索和多作者功能
  • 没有插件或页面构建器系统,扩展性非常有限
  • 仅支持 SQLite,且需要 PHP 8.1+ 和 PDO SQLite

README 快速开始

Wren CMS

A whole website in one small file.

Wren is a content management system in the spirit of sNews (2004–2016), rebuilt from scratch for the modern web. One PHP file, one SQLite database it creates itself, no framework, no Composer, no build step. Upload it, open it in a browser, and start writing.

Version 0.1.0 "Troglodytes" · MIT licence

Requirements

  • PHP 8.1 or newer with PDO SQLite — standard on virtually every shared host
  • That's it. No MySQL setup, no command line, no dependencies.

Install

  1. Upload index.php to your web space (a folder of its own is tidiest).
  2. Visit it in a browser.
  3. Fill in the one-minute setup form: site title, username, password.

Wren creates wren.db beside itself and signs you in. Done.

Optional: upload .htaccess too (Apache with mod_rewrite), then switch on Pretty URLs in Settings to get /my-article instead of /?q=my-article. The .htaccess also blocks direct downloads of wren.db — recommended. On hosts without .htaccess support, keep Pretty URLs off and consider moving wren.db out of the web root once you're comfortable editing the WREN_DB constant at the top of the file.

Writing

  • Articles appear on the home page, newest first, and in the RSS feed (/rss).
  • Pages appear in the site menu (order them with menu position).
  • Both are written in markdown: **bold**, *italic*, # headings, [links](https://…), ``, lists, quotes, and fenced
    Wren trusts you.
    
  • Untick Published to keep something as a draft only you can see.

Theming

Wren ships with a built-in default theme. To use your own, place a file named theme.html beside index.php — plain HTML with these tags where you want things to appear:

{{site_title}}  {{tagline}}   {{page_title}}  {{menu}}
{{content}}     {{home_url}}  {{rss_url}}     {{year}}  {{generator}}

That's the entire theming API. A theme is one HTML file a designer can read.

Security notes

  • Passwords are stored with PHP's password_hash (bcrypt/argon2, never plain).
  • Every form is CSRF-protected; every query uses prepared statements.
  • Repeated failed logins are slowed automatically.
  • All reader-facing output of your titles and settings is HTML-escaped.

Roadmap

Comments with moderation, image uploads, search, multiple authors, exp

项目描述

tiny, quick, sings louder than its size suggests.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

1227cwx
1227cwx GitHub avatar

HDupay

HDupay is an open-source demo platform for accepting stablecoin payments (USDC/USDT) on EVM networks using hierarchical deterministic wallets, built with Webman (PHP) and Vue 3.

PHP
22
islam-re
islam-re GitHub avatar

Algeria-wilayas

A dataset of all 69 Algerian wilayas (provinces) following the 2026 administrative reform, provided in multiple data formats.

数据与数据库数据库与存储
15
ideaseek-zh
ideaseek-zh GitHub avatar

trading-studio

An event-driven research and analysis platform for Chinese A-share stock traders, integrating real market data, news, announcements, and AI-powered analysis without simulated data or automated trading.

PHP
14