Blog Site in PHP using CodeIgniter 4 Framework Free Source Code

Language

Introduction

This simple project is a Blog Site. This is a web-based application project developed in PHP, CodeIgniter 4 Framework, and MySQL Database. This project's main goal is to develop a simple CMS (Content Management System) project which is a dynamic website that allows the site management and authors to publish their articles online. Visitors can read some published articles from the site and explore other articles by category. It has a pleasant user interface using the Bootstrap Framework that gives the end-users a better experience while using the application. It consists of user-friendly features and functionalities.

About the Blog Site

I developed this project using the following:

This Blog Site is accessible to Site Management, Authors, and Public Visitors. Here, only the administrator and the authors have the privilege to create, edit, and delete articles or posts. The system requires the said user roles to log in with their registered and valid credentials in order to access the management features and functionalities. Each user type has different permissions and access to the project features and functionalities.

The Administrator Users have the privilege to access and manage all the features and functionalities of the project both on the management site and public site. They are the only ones who can access and manage the list of users. Admin users also have the privilege to overwrite the authors' published or posted articles.

The Author Users are only allowed to manage their accounts and published articles. The author can simply register to the site as an author by filling in the required fields on the registration form. They can only list, edit, and delete their own created or posted articles.

The Public Visitors are allowed to explore the public features of the site. They list all published articles, list all filtered articles by category, list all categories, and view the article content.

This Blog Site Project in CodeIgniter contains different features and functionalities that are relevant to a common Content Management System Site. Some of these are the CRUD Operations for Categories and Posts Management, List Pagination and etc.

Features

Public-Site

  • List All Published Articles
  • List All Categories
  • List All Filtered Articles By Category
  • Read the Article Content
  • List Paginations

Authors-Site

  • Home Page
    • Display the summary.
  • Post Management
    • Add New Post
    • List All Posts
    • Edit/Update Post Details
    • View Post Details
    • Delete Post
  • Update Account Details/Credentials
  • Login and Logout

Administrator-Site

  • Home Page
    • Display the summary.
  • Category Management
    • Add New Category
    • List All Categories
    • Edit/Update Category Details
    • Delete Category
  • Post Management
    • Add New Post
    • List All Posts
    • Edit/Update Post Details
    • View Post Details
    • Delete Post
  • User Management
    • Add New User
    • List All Users
    • Edit/Update User Details
    • Delete User
  • Update Account Details/Credentials
  • Login and Logout

The source code was developed only for educational purposes only. You can download the source code for free and modify it the way you wanted.

System Snapshots of some Features

Public Home Page

Blog Site

Public Category List

Blog Site

Public Filtered Posts By Category

Blog Site

Public Post Content Page

Blog Site

Registration Form Page

Blog Site

Administrator Site

Blog Site

Posts List (Administrator/Author)

Blog Site

How to Run ??

Requirements

  • Download and Install any local web server such as XAMPP.
  • Download the provided source code zip file. (download button is located below)

System Installation/Setup

  1. Open your XAMPP Control Panel and start Apache and MySQL.
  2. Extract the downloaded source code zip file.
  3. Copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory.
  4. Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin
  5. Create a new database naming blog_db.
  6. Import the provided SQL file. The file is known as blog_db.sql located inside the database folder.
  7. Browse the Blog Site in a browser. i.e. http://localhost/ci4_blog/.

Admin Default Access:

Email: [email protected]
Password: admin123

Sample Author Access:

Email: [email protected]
Password: mcooper123

DEMO VIDEO

That's it. You can now explore the features and functionalities of this Blog Site in PHP using CodeIgniter 4 Framework. I hope this will help you with what you are looking for and you'll find something useful for your future projects.

Explore more on this website for more Free Source Codes and Tutorials.

Enjoy :)

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Hi Carlo

Project look great but I am getting

Creation of dynamic property App\Controllers\Blog::$session is deprecated 

I look into int more, not sure wether is CI or PHP, any ideas? or can you point me in the general direction?

 

regards

 

Computaphile

I installed this on my server but when I click on any link it just shows the index page. How can i fix this? I put the domain url to .env and also config/app.php file baseurl

Add new comment