Skip to content

6arshid/bluecms-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BlueCMS β€” PHP Multi-User Blog Platform

PHP 8.0+ MySQL Bootstrap 5 MIT License Version

BlueCMS is a powerful, open-source multi-user blogging platform built with PHP & MySQL.
Each registered user gets their own blog with a custom domain, themes, and full content management.

Developed by 6arshid


✨ Features

πŸ‘₯ Multi-User System

  • Every registered user gets their own blog at /blog/username
  • Custom domain parking (Pro feature)
  • Blog team management β€” invite editors & admins
  • User version system: Basic (free) / Pro (paid)

πŸ“ Content Management

  • Rich WYSIWYG editor (Quill.js)
  • Posts with title, content, thumbnail, category, tags
  • Multilingual category support
  • Post status: Published / Draft
  • Import from WordPress XML (WXR) or BlueCMS XML
  • Export to WordPress XML or BlueCMS XML

🎨 Blog Customization

  • 3 professional themes: Minimal, Responsive Pro, Professional
  • Dark mode toggle
  • Custom primary color picker with live preview
  • Drag & drop layout block builder (7 blocks)
  • Custom avatar, cover photo, and bio

πŸ’¬ Engagement

  • Comment system (guest + logged-in users)
  • Reply threads (nested comments)
  • Post reactions: πŸ‘ πŸ‘Ž ❀️ πŸ”₯ πŸ˜‚ 😒 (Telegram-style animation)
  • Email subscriptions with double opt-in

πŸ”Œ Plugin System

  • WordPress-compatible hook API (add_action, add_filter, apply_filters)
  • Upload plugins as .zip files
  • Built-in plugins:
    • AI Content Generator β€” ChatGPT, Claude, DeepSeek, Gemini
    • RSS Importer β€” Import from any RSS/Atom feed

πŸ”’ Security

  • All queries use prepared statements (zero SQL injection)
  • CSRF protection on all forms
  • Secure file uploads (MIME type validation)
  • Session fixation protection
  • Rate limiting on comments & subscriptions

πŸ’³ Monetization

  • Stripe payment integration (subscriptions)
  • Advertisement system (banner + text ads)
  • User-managed ads on their own blogs

🌐 Domain & DNS

  • Custom domain parking with DNS verification
  • Per-domain Google reCAPTCHA v2 keys
  • NS record management

βš™οΈ Admin Panel

  • Full user management (add, edit, suspend, upgrade)
  • Global advertisement management
  • Language management with flag images
  • Plugin manager
  • Stripe & SMTP & reCAPTCHA settings

πŸš€ Quick Install

Requirements

  • PHP 8.0+ (with mysqli, curl, zip, mbstring, fileinfo)
  • MySQL 5.7+ or MariaDB 10.3+
  • Apache with mod_rewrite enabled

1. Clone the repository

git clone https://github.com/6arshid/bluecms-php.git
cd bluecms-php

2. Configure

Edit config.php:

define('DB_HOST', 'localhost');
define('DB_USER', 'your_db_user');
define('DB_PASS', 'your_db_password');
define('DB_NAME', 'bluecms');
define('SITE_URL', 'http://yourdomain.com/bluecms');

3. Create database & run setup

mysql -u root -p -e "CREATE DATABASE bluecms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"

Then open in browser:

http://localhost/bluecms/setup.php

4. Login

URL:      http://localhost/bluecms/admin/
Email:    admin@admin.com
Password: admin123!!

⚠️ Change the admin password immediately after first login!
Delete setup.php after setup is complete!


πŸ“ Project Structure

bluecms/
β”œβ”€β”€ config.php                    # Configuration & helpers
β”œβ”€β”€ setup.php                     # Installation wizard
β”œβ”€β”€ migrate.sql                   # DB migration for upgrades
β”‚
β”œβ”€β”€ admin/                        # Admin panel
β”‚   β”œβ”€β”€ plugins/                  # Plugin manager
β”‚   └── pages/                    # Users, posts, settings, etc.
β”‚
β”œβ”€β”€ dashboard/                    # User dashboard
β”‚   β”œβ”€β”€ posts/                    # Post CRUD
β”‚   β”œβ”€β”€ categories/               # Category management
β”‚   β”œβ”€β”€ team.php                  # Blog team management
β”‚   β”œβ”€β”€ subscribers.php           # Email subscriber management
β”‚   β”œβ”€β”€ theme.php                 # Theme & dark mode selector
β”‚   β”œβ”€β”€ import.php                # XML import
β”‚   └── export.php                # XML export
β”‚
β”œβ”€β”€ blog/                         # Public blog frontend
β”‚   β”œβ”€β”€ view.php                  # Blog index + single post
β”‚   β”œβ”€β”€ archive.php               # Date & tag archive
β”‚   └── sidebar.php               # Sidebar widget
β”‚
β”œβ”€β”€ includes/                     # Shared widgets
β”‚   β”œβ”€β”€ comments.php              # Comment system
β”‚   β”œβ”€β”€ reactions.php             # Emoji reactions
β”‚   └── subscribe_form.php        # Email subscription widget
β”‚
β”œβ”€β”€ api/                          # AJAX endpoints
β”‚   β”œβ”€β”€ react.php                 # Reactions API
β”‚   β”œβ”€β”€ comment.php               # Comment submit API
β”‚   └── delete_comment.php        # Comment delete API
β”‚
β”œβ”€β”€ plugins/                      # Plugin directory
β”‚   β”œβ”€β”€ ai-content-generator/     # AI post generation
β”‚   └── rss-importer/             # RSS feed importer
β”‚
└── assets/
    └── themes/                   # Theme CSS files
        β”œβ”€β”€ minimal.css
        β”œβ”€β”€ responsive.css
        β”œβ”€β”€ professional.css
        └── dark.css

πŸ”Œ Plugin Development

Plugin Structure

plugins/
└── my-plugin/
    β”œβ”€β”€ plugin.json      # Plugin metadata (required)
    β”œβ”€β”€ plugin.php       # Main plugin file (auto-loaded when active)
    β”œβ”€β”€ settings.php     # Settings page (optional)
    └── README.md        # Documentation (optional)

plugin.json Format

{
    "name": "My Plugin",
    "slug": "my-plugin",
    "version": "1.0.0",
    "description": "What this plugin does",
    "author": "Your Name",
    "author_url": "https://github.com/yourname",
    "min_bluecms": "1.0.0",
    "settings_page": "settings.php"
}

Available Hooks

// Actions
add_action('dashboard_post_create_sidebar', 'my_function');
add_action('dashboard_post_edit_sidebar',   'my_function');
add_action('dashboard_tools_page',          'my_function');

// Filters
add_filter('post_content', 'my_content_filter');

// Plugin settings
getPluginSetting('my-plugin', 'api_key');
setPluginSetting('my-plugin', 'api_key', 'sk-...');

WordPress Compatibility

BlueCMS plugins use the same hook API as WordPress:

  • add_action() / do_action()
  • add_filter() / apply_filters()
  • add_shortcode()

WordPress plugins cannot run directly in BlueCMS (different database structure), but plugin code can be ported with minimal changes.


πŸ—ƒοΈ Database Tables

Table Description
users User accounts + blog settings
posts Blog posts
categories Post categories
category_translations Multilingual category names
tags / post_tags Tag system
comments Post comments (threaded)
post_reactions Emoji reactions per post
post_views_log Daily view tracking
blog_views_log Daily blog visit tracking
blog_team Multi-admin team members
email_subscriptions Blog email subscribers
email_campaigns Sent email campaigns
parked_domains Custom domain management
advertisements Admin-managed ads
user_ads User-managed ads
languages Multilingual support
payments Stripe payment records
plugins Installed plugins
plugin_settings Plugin configuration
site_settings Global site configuration

πŸ”§ Upgrading from Previous Version

If you're upgrading from a previous BlueCMS installation, run the migration:

mysql -u root -p bluecms < migrate.sql

Or run setup.php β€” it automatically applies all migrations.


πŸ“„ License

MIT License β€” free for personal and commercial use.


πŸ‘€ Author

6arshid
GitHub: https://github.com/6arshid
Repository: https://github.com/6arshid/bluecms-php


Made with ❀️ by 6arshid

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors