Project 4: Build a CRUD Blog with Image Upload (Self Practice)

This project is a practice assignment where you will apply everything you have learned so far.

Project Objective

Create a blog system with image upload where:

  • Admin can add posts with featured images
  • Posts are stored in database
  • Images are uploaded securely
  • Posts can be edited and deleted

Required Features

Students must implement:

1️⃣ Add Post

  • Title
  • Content
  • Featured Image

2️⃣ View Posts

  • Show title, content, and image
  • Latest posts first

3️⃣ Edit Post

  • Update text
  • Replace image (optional)

4️⃣ Delete Post

  • Remove post from database
  • Delete image from uploads folder

Rules & Constraints

  • Only image files allowed
  • Image size limit
  • Unique image names
  • Use MySQL database
  • Use procedural PHP (mysqli)

Suggested Database Structure

CREATE TABLE posts (
    id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(255),
    content TEXT,
    image VARCHAR(255),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Learning Outcome

After completing this project, students will:

  • Think like a backend developer
  • Understand real CMS logic
  • Be ready for:
    • WordPress plugin development
    • Admin dashboards
    • Client projects

Bonus Challenges (Optional)

Show default image if none uploaded

Add post status (published/draft)

Add login protection

If you can complete this project on your own,
you are ready to work on real PHP projects.

Related Tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *