A professional, modular, and secure blogging platform built with PHP and MySQL. Designed for clarity, scalability, and security, following recruiter-grade and open-source standards.
Enable individuals and teams to publish, manage, and share blog content securely and efficiently, with a codebase suitable for enterprise and open-source adoption.
- src/: Core logic (controllers, models, views)
- config/: Configuration and environment setup
- tests/: Unit and integration tests
- docs/: Architecture, contributing, changelog, security
- scripts/: Automation and utilities
See docs/ARCHITECTURE.md for details.
- PHP 7.0+
- MySQL
- Bootstrap (frontend)
- Composer (recommended)
- Clone the repository:
git clone https://github.com/JosephJonathanFernandes/Simple-Blog-PHP.git
- Copy
.env.exampleto.envand set your environment variables. - Create a MySQL database and import schema (see
init_db.php). - Configure your web server (e.g., Apache, Nginx) to serve the project.
- Run
composer installif using dependencies.
Access the app in your browser at http://localhost/Simple-Blog-PHP.
- Modular, readable, and scalable codebase
- Secure by default (no hardcoded secrets)
- Easy to extend and maintain
- Reviewer- and recruiter-friendly
- No hardcoded secrets
- Input validation and sanitization
- See docs/SECURITY.md
- See tests/ for unit and integration tests
- Recommended: PHPUnit
MIT
-
Register or create an admin user (via create_admin.php).
-
Login and start creating posts.
-
Manage posts with edit and delete options.
-
index.php - Homepage listing posts
-
create_post.php - Form to add new posts
-
edit_post.php - Edit existing posts
-
delete_post.php - Delete posts
-
db.php - Database connection
-
uploads/ - Folder to store uploaded images
-
Uses prepared statements to prevent SQL injection
-
Basic input validation on forms
-
Avoid uploading unsafe file types
- This project is open-source and free to use.