PHP Content Management Module

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.


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.


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

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
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
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
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
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
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
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
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
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)

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_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.

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!

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 and chat me up.

Hi! I'm Mike Dalisay, the co-founder of, 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.