PHP Content Management Module

php-web-page-content-management-system
Looking for PHP Contact Form Script? Click Here.

Download and learn how this simple PHP Web Page Content Management System was made. Technologies used include PHP OOP, MySQL, Bootstrap and jQuery.

Script Overview

This source code will enable you to manage a dynamic web page content. You can format the content the way you want it. Put links, files, images, texts and more on your web page.

The system looks simple. But I assure you that when you study the source code, you will learn a lot of useful PHP coding techniques.

Some include: How to use a rich text editor with a file manager and browser, coding an SEO-friendly web page, file upload and deletion, system user restrictions and more! You can see the detailed list of features on section 6.0 below.

This source code is a very good starting point if you're trying to build your own PHP Web Page Content Management System (CMS) and add some more complex features later.

Pre-Requisite

Before you download, please make sure you have basic understanding of the following topics.

a. PHP, MySQL and OOP CRUD Tutorial – Step by Step Guide!
b. Apache .htaccess RewriteRule Examples

Once you learned our tutorials above, this source code should be easy to understand.

Output Preview

Below are some screenshots of our script's output. You can click an image to view the larger version of it.

Please note that the following images are just output previews. New features might be added already the time you are reading this.

[espro-slider id=5990]

Database Design

Our database name will be "php_web_page_cms", and we will have two tables: Pages and Users.

database-design-php-web-page-content-management-system

File Structure

The following folders and files are included in our source code. It will have more meaning if you will see the code inside the folders and files.
├─ admin/
├─── create_page.php
├─── delete_page.php
├─── index.php
├─── layout_foot.php
├─── layout_head.php
├─── login_checker.php
├─── navigation.php
├─── paging.php
├─── remove_featured_image.php
├─── search_page.php
├─── update_page.php
├─ config/
├─── core.php
├─── database.php
├─ dev/
├─── php_web_page_cms.sql
├─── readme.txt
├─ images/
├─ libs/
├─── css/
├────── bootstrap/
├────── font-awesome/
├─── js/
├────── bootstrap-image-gallery/
├────── responsive_filemanager/
├────── tinymce/
├────── bootbox.min.js
├────── custom-script.js
├────── jquery.js
├─── php/
├────── pw-hashing/
├────── utils.php
├─ objects/
├─── page.php
├─── user.php
├─ .htaccess
├─ index.php
├─ info.php
├─ layout_foot.php
├─ layout_head.php
├─ login.php
├─ logout.php
├─ navigation.php
├─ page.php

Features List & Download - PHP Web Page Content Management System

FEATUREPHP WEB PAGE CMS
Learn more techniques when coding with PHP, MySQL and OOPYES
Save your precious time coding and searching about how to do the features below.YES
PHP PDO and Prepared StatementsYES
jQuery enabledYES
Bootstrap enabledYES
Font-awesome enabledYES
TinyMCE enabledYES
Buttons are displayed with appropriate iconsYES
USER
Login using email and passwordYES
Log out userYES
Hashed password stored in databaseYES
Logged-in user name display on the right side of navigation barYES
Log-out button displayed on drop-down when user name was clickedYES
Page can be edited and deleted by the user who created itYES
When user tries to edit a page he did not created, he will be redirected to home pageYES
'View Page' nagivation bar will show 'Admin' if user is logged in, else it will be a link to login pageYES
CREATE A PAGE
Title fieldYES
Title is shown as page title when shared on FacebookYES
Slug fieldYES
Slug must be unique (validated when form was submitted)YES
Slug is formatted automatically via JavaScript when form not yet was submittedYES
Slug is formatted automatically via PHP when form was submittedYES
Fill out slug field automatically while you typeYES
Fill out slug field automatically when title field loses focusYES
Body fieldYES
Rich text editor using TinyMCE (like WordPress)YES
Upload and browse files using a file managerYES
Format your content with links, texts, images and more.YES
Meta Description fieldYES
Meta Description is shown as page description when shared on FacebookYES
Featured Image fieldYES
Featured Image is shown as page image when shared on FacebookYES
Featured Image allowed file types: JPG, PNG, GIFYES
Featured Image must be less than 1MB in sizeYES
Save Featured Image file in server directoryYES
Status fieldYES
Page 'Status' can be 'Draft' or 'Published'YES
Button link to read pagesYES
Only a logged in user can create a page, else he will be redirected to login pageYES
READ PAGES
Display list of pagesYES
Featured Image columnYES
Title columnYES
Status columnYES
Author columnYES
Created columnYES
Actions columnYES
Featured images can be clicked and shown in a lightboxYES
View page button to view page contentYES
Edit button to update page contentYES
Delete button to delete page contentYES
Clicking 'Delete' button will show confirmation pop upYES
Edit and Delete button will appear only if the logged-in user created that pageYES
Pagination for list of pagesYES
UPDATE A PAGE
Read Pages button to go back to list of pagesYES
Fields has almost the same features as the 'Create Page' section above, but the following are some differecesYES
View Page button to view page contentYES
Fill out form fields with data from database (based on given page ID)YES
Show uploaded featured image (if any) under Featured Image fieldYES
'Remove Featured Image' button under Featured ImageYES
Clicking 'Remove Featured Image' button will show confirmation pop upYES
Featured image can be clicked and shown in a lightboxYES
Highlight Bootstrap radio button based on selected 'Status'YES
'Slug' field is not fill out automatically when 'Title' field was changed. This is because it is not recommended to change a page URL.YES
DELETE A PAGE
Clicking 'Delete' button will show confirmation pop upYES
If user clicked 'No', pop up will disappear and nothing will be deletedYES
If user clicked 'Yes', it will post page ID to delete_page.php so it can be deletedYES
SEARCH PAGES
User can enter search term in search box, then press enter to searchYES
System will search page title, slug, body and meta description for the search termYES
Display list of pages with the search termYES
Pagination in search resultsYES
VIEW PAGE
Show page titleYES
Show featured imageYES
Clicking featured image will show it in a lightboxYES
Show page content / bodyYES
All images in the body can be clicked and shown in a lightboxYES
Show author and date createdYES
Show share buttons with iconsYES
Users can share the page to Facebook, Twitter or Google+YES
'Edit This Page' button will appear under 'Title' if user is logged inYES
SEO-friendly URL. Page URL does not have parameter like page ID. Page content is retrieved by slug.YES
Used Apache .htaccess file to make SEO-friendly URL workYES
Select 'Published' pages in navigation drop-downYES
SUPPORT AND UPDATES
Free support for 6 months.YES
Free source code updates.YES
[purchase_link id="16098" text="DOWNLOAD SOURCE CODE NOW" style="button" color="green"]

Simple Set Up

If you download this (PHP Web Page Content Management System) source code, here are the few instructions how to run this source code:

1. Copy the extracted files to your localhost or upload it to your webserver.

2. You have to create your database using PhpMyAdmin, name of the database: php_web_page_cms

3. Import the SQL file called "php_web_page_cms.sql" located in the "dev" folder.

4. Change line 7 .htaccess file (No changes should be made if you put the files on the root directory of your localhost)
RewriteBase /YOUR_ROOT_DIRECTORY/

5. Run the login.php file on your browser, use the following user credentials.

User #1
Username: [email protected]
Password: ninja12qw!@QW

User #2
Username: [email protected]
Password: darwin12qw!@QW

To make TinyMCE file manager / file browser work: (No changes should be made if you put the files on the root directory of your localhost)

Change line 71 of /libs/js/responsive_filemanager/filemanager/config/config.php

'upload_dir' => '/YOUR_ROOT_DIRECTORY/libs/js/responsive_filemanager/source/',


Change line 78-79 of /admin/layout_foot.php

external_filemanager_path:"/YOUR_ROOT_DIRECTORY/libs/js/responsive_filemanager/filemanager/",
external_plugins: { "filemanager" : "/YOUR_ROOT_DIRECTORY/libs/js/responsive_filemanager/filemanager/plugin.min.js"},

Related Source Code Modules


You can download the PHP SHOPPING CART SYSTEM by modules. Learn more by clicking any 'View Module' button below.


ModulesAction
PHP Login & Registration Module
PHP Shopping Cart Module
PHP Product Catalog Module
PHP Content Management Module
PHP Contact Form Module
PHP PayPal Integration Module

Thank You!

Thank you for reading about this PHP Web Page Content Management System source code and supporting our projects here at codeofaninja.com!

If you have any questions, comments or suggestions, please do not hesitate to contact me.
a. Send me an email. My email address is [email protected]
b. Go to https://fb.com/codeofaninja and chat me up.

Hi! I'm Mike Dalisay, the co-founder of codeofaninja.com, a site that helps you build web applications with PHP and JavaScript. Need support? Comment below or contact [email protected]

I'm also passionate about technology and enjoy sharing my experience and learnings online. Connect with me on LinkedIn, Twitter, Facebook, and Instagram.