Skip to content
anbarliPublic

About

Lightweight self-hosted PHP Markdown blog engine with flat-file posts, admin panel, SEO-friendly URLs, RSS, sitemap, search, and dark mode.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

PHP-MBBS / PHP Markdown Based Blog System

License: MIT PHP Markdown

Lightweight, self-hosted PHP blog engine for Markdown posts. PHP-MBBS stores content as flat files, ships with an admin panel, and includes SEO-friendly URLs, RSS, sitemap, search, dark mode, and basic security controls.

🇹🇷 Türkçe | 🇬🇧 English

Live demo: https://anbarli.com.tr/blog


🇹🇷 Türkçe

📝 Açıklama

PHP ve Markdown kullanarak çalışan hafif, veritabanı gerektirmeyen ve kendi sunucunuzda barındırabileceğiniz bir blog sistemi. Yazılar dosya tabanlı tutulur; admin paneli, SEO dostu URL'ler, RSS beslemesi, sitemap, arama, dark mode ve temel güvenlik önlemleriyle birlikte gelir.

Neden PHP-MBBS?

  • Veritabanı gerekmez: Markdown dosyalarıyla hızlı kurulum ve kolay yedekleme
  • Admin paneli vardır: Yazı, kategori ve temel ayar yönetimi
  • SEO hazır gelir: Meta etiketler, Open Graph, Twitter Cards, structured data, sitemap ve RSS
  • Paylaşımlı hosting uyumlu: PHP 7.4+ ve Apache mod_rewrite yeterlidir
  • Kişisel blog odaklıdır: Not, makale ve pratik bilgi yayınlamak için sade yapı

✨ Temel Özellikler

  • Markdown Desteği: Blog yazıları Markdown formatında
  • Flat-file İçerik: Yazılar dosya sisteminde tutulur, veritabanı gerekmez
  • SEO Optimizasyonu: Dostu URL'ler, meta etiketler, sitemap
  • Admin Paneli: Yazı yönetimi, kategori yönetimi, ayarlar
  • Arama Sistemi: Gelişmiş arama özelliği
  • Dark Mode: Karanlık/aydınlık tema desteği
  • RSS Beslemesi: Otomatik RSS oluşturma
  • Güvenlik: XSS koruması, session yönetimi, şifre hash'leme
  • Performans: Önbellekleme sistemi, gzip sıkıştırma

🔧 Gereksinimler

  • PHP 7.4+
  • Apache (mod_rewrite etkin)
  • Web tarayıcısı

📦 Kurulum

  1. Projeyi klonlayın:

    git clone https://github.com/anbarli/PHP-MBBS.git
    cd PHP-MBBS
  2. Ayarları yapılandırın:

    cp config.local.example.php config.local.php
    cp admin/admin.env.example admin/admin.env
  3. Dosyaları düzenleyin:

    • config.local.php: Site ayarları
    • admin/admin.env: Admin bilgileri
  4. Blog yazılarını ekleyin:

    • posts/ klasörüne .md dosyaları ekleyin
  5. Tarayıcıda açın:

    • Ana sayfa: http://localhost/blog/
    • Admin paneli: http://localhost/blog/admin/

📝 Blog Yazısı Formatı

---
title: Yazı Başlığı
category: Kategori
tags: [etiket1, etiket2]
date: 2024-01-15
---

# İçerik
Markdown formatında yazınız...

🏗️ Proje Yapısı

/blog/
├── posts/          # Blog yazıları
├── admin/          # Admin paneli
├── includes/       # Sistem dosyaları
├── cache/          # Önbellek (otomatik)
├── index.php       # Ana sayfa
├── post.php        # Yazı sayfası
├── search.php      # Arama
├── rss.php         # RSS beslemesi
└── config.php      # Yapılandırma

🔒 Güvenlik

  • XSS koruması
  • Path traversal koruması
  • Session yönetimi
  • Şifre hash'leme
  • Admin kimlik doğrulama

📊 SEO Özellikleri

  • Meta etiketler
  • Open Graph
  • Twitter Cards
  • Structured Data
  • XML Sitemap
  • Robots.txt

🇬🇧 English

📝 Description

A lightweight, self-hosted PHP blog system powered by Markdown and flat files. It includes an admin panel, SEO-friendly URLs, RSS feed, sitemap, search, dark mode, and basic security controls without requiring a database.

Why PHP-MBBS?

  • No database required: Fast setup and simple backups with Markdown files
  • Admin panel included: Manage posts, categories, and core settings
  • SEO-ready: Meta tags, Open Graph, Twitter Cards, structured data, sitemap, and RSS
  • Shared-hosting friendly: PHP 7.4+ and Apache mod_rewrite are enough
  • Built for personal publishing: Ideal for notes, articles, and practical knowledge

✨ Key Features

  • Markdown Support: Blog posts in Markdown format
  • Flat-file Content: Posts are stored on the filesystem, no database required
  • SEO Optimization: Friendly URLs, meta tags, sitemap
  • Admin Panel: Post management, category management, settings
  • Search System: Advanced search functionality
  • Dark Mode: Dark/light theme support
  • RSS Feed: Automatic RSS generation
  • Security: XSS protection, session management, password hashing
  • Performance: Caching system, gzip compression

🔧 Requirements

  • PHP 7.4+
  • Apache (mod_rewrite enabled)
  • Web browser

📦 Installation

  1. Clone the project:

    git clone https://github.com/anbarli/PHP-MBBS.git
    cd PHP-MBBS
  2. Configure settings:

    cp config.local.example.php config.local.php
    cp admin/admin.env.example admin/admin.env
  3. Edit files:

    • config.local.php: Site settings
    • admin/admin.env: Admin credentials
  4. Add blog posts:

    • Add .md files to posts/ folder
  5. Open in browser:

    • Homepage: http://localhost/blog/
    • Admin panel: http://localhost/blog/admin/

📝 Blog Post Format

---
title: Post Title
category: Category
tags: [tag1, tag2]
date: 2024-01-15
---

# Content
Write your content in Markdown format...

🏗️ Project Structure

/blog/
├── posts/          # Blog posts
├── admin/          # Admin panel
├── includes/       # System files
├── cache/          # Cache (auto-generated)
├── index.php       # Homepage
├── post.php        # Post page
├── search.php      # Search
├── rss.php         # RSS feed
└── config.php      # Configuration

🔒 Security

  • XSS protection
  • Path traversal protection
  • Session management
  • Password hashing
  • Admin authentication

📊 SEO Features

  • Meta tags
  • Open Graph
  • Twitter Cards
  • Structured Data
  • XML Sitemap
  • Robots.txt

📄 License

MIT License - see LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create feature branch
  3. Commit changes
  4. Push to branch
  5. Open Pull Request

🆘 Support

For issues, use GitHub Issues.


2026 Update Notes

Turkish (TR)

  • admin/admin.env icindeki ADMIN_PASSWORD alani artik password_hash() cikti formatini kullanir ($2y$... / bcrypt-argon2).
  • Frontend/admin CSS ve JS dosyalari assetPath() ile versiyonlanir (?v=filemtime) ve cache kaynakli eski dosya sorunu azalir.
  • .htaccess CSP kurallari guncellendi:
    • script-src: https://static.cloudflareinsights.com eklendi.
    • connect-src: https://cdn.jsdelivr.net ve https://static.cloudflareinsights.com eklendi.

English (EN)

  • ADMIN_PASSWORD in admin/admin.env now expects password_hash() output format ($2y$... / bcrypt-argon2).
  • Frontend/admin CSS and JS assets are versioned via assetPath() (?v=filemtime) to reduce stale-cache issues.
  • .htaccess CSP has been updated:
    • script-src: added https://static.cloudflareinsights.com
    • connect-src: added https://cdn.jsdelivr.net and https://static.cloudflareinsights.com

CLI Quick Post

Create a draft post file from terminal:

./new-post "Post Title"

Windows:

new-post.cmd "Post Title"

Options:

./new-post "Post Title" --category=Genel --tags=php,blog --status=draft --description="Kisa ozet" --date=2026-03-01

About

Lightweight self-hosted PHP Markdown blog engine with flat-file posts, admin panel, SEO-friendly URLs, RSS, sitemap, search, and dark mode.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages