How to create a blog website using PHP with source code

Create an online news portal or blog website using the complete blog website script which is written in PHP and MYSQL database. To run this project you need a local server (XAMPP). The free zipped file is provided in this article.

How to create a blog website using PHP with source code
How to create a blog website using PHP with source code

Table of content

  1. About the blog website using PHP
  2. Features of the blog website using PHP
  3. Script detail
  4. Server Requirements
  5. How to run the downloaded source code
  6. The screenshots

About the blog website using PHP

This Blog website script is a PHP script written in PHP. With this script, you create your own blog or news website. This project comes with two different access methods, which are the admin panel and the user or visitors side. You can use this script to learn how to create your own news/blog website. This project is written in PHP and MYSQL database.

This project is a best way to create your blog or news website. The admin has a dashboard which shows the analytics or summary of website activities.

The admin is the only one who can add other administrators by filling in the username, email and password. The admin can also manage all other created administrators. The Management includes editing of the admin and deleting of the admin.

Admin can also add category for posts and also manage other categories already created. Any category created can also be edited or deleted. Sub-category can also be added but categories must first be added so you can select the category and add the sub-categories it. The created category can also be edited or deleted.

The Admin adds posts with the post thumbnail and content. Post already added can be updated anytime or deleted if not useful again.

Default pages like the about us or contact us page can be updated or contents changed anytime.

 The admin manages all comments made on any post (both approved and non-approved).

Students in IT can learn from this project to create their own school projects.

This project is responsive, and has good website visitor’s interaction. It includes so many features which are listed below.

Features of the blog website using PHP

Admin panel

  • Dashboard: shows the total number of categories, sub-categories, live news and many others.
  • Categories: admin can create a category, and manage all created categories. They can view the date categories were created, delete a category or delete a category.
  • Subcategory: administrators can create subcategory from the category created.
  • Posts: Admin can create posts, format a post for SEO. Other created posts can be managed from here. Posts can be deleted, modified. Deleted posts are moved to the trash. From the trash the posts can be deleted forever.
  • Pages: admin can manage the website default pages like the about page, contact page etc.
  • Comments: admin can manage comments made on a blog posts by users. When comment is made by the visitor, they need to be approved by the admin before they can show on the website.
  • Change password.
  • Login and logout system.
  • Responsive pages.

Visitors Side

  • Make comments on posts
  • Read blog posts
  • Read contents by category
  • Search system
  • Recent posts
  • See time a post was published
  • Post view count
  • Contact page
  • Updated time

Script Details

  • Written in – PHP, HTML, JavaScript
  • Database – MYSQL
  • Design – Bootstrap, CSS
  • Includes – README file
  • Type – web application
  • Download type – Zip file
  • Download size – 24.5mb

Requirements

 Almost all servers already have them installed.

  • PHP 7+
  • MYSQL Database

Step by step to run the script (installation)

A server is required to run this project. We will be using XAMPP.

For XAMPP

  1. The script is provided below, click on download to start downloading the script.
  2. Go to your download folder in your Pc and extract the source code folder.
  3. Copy the folder you extracted and paste it in (for XAMPP xampp/htdocs, for WAMPP wampp/www, for LAMPP var/www/html) root directory in your pc.
  4. Open your XAMPP Control panel and start Apache and MYSQL.

Creating a database

  1. Open your browser
  2. Go to this path “http://localhost/phpmyadmin/
  3. Click on New on the left side of the screen.
  4. Create a database named “newsportal”.
  5. Click on the import tab.
  6. Click on browse file and select “newsportal.sql” file from the DB folder we extracted.
  7. Click on Go.

After creating a database

  1. Open a new tab on your browser and go to the path. E.g. “http://localhost/news-portal/ OR http://localhost/[The project folder]/ the home page will be displayed
  2. Login using the details below.

This Blog system can be used by IT students for their projects. It is written in PHP and uses MySQL database. This web application can be downloaded below, using the links provided below. You might get errors if you use PHP version greater or lesser than the one we have provided in the requirements.

 

SCRIPT ZIP PASSWORD - alphacodecamp

Login info

Admin Login

URL: http://localhost/news-portal/admin

Username: admin

Password: alphacodecamp

SCREENSHOTS

How to create a blog website using PHP with source code

How to create a blog website using PHP with source code

How to create a blog website using PHP with source code