Build a Custom CMS Using PHP and MySQLi


In this video tutorial, we'll be building a custom Content Management System (CMS) using PHP and MySQLi. We'll start off by pulling our content from a MySQL database and then build a CMS admin panel to manage our content. For easy content management, we will be using TinyMCE as our editor. I hope you enjoy the screencast.

Screencast Tutorial



  1. So we started out with a simple HTML layout
  2. We put all our content in a MySQL database
  3. We pulled our content from the database into our website using some PHP
  4. We built a custom CMS with the help of TinyMCE to edit our content
  5. We made our CMS functional
  6. We are done! Congrats!

After Thoughts

I realized that in the preview at the beginning of the tutorial, the sidebar also had some user controls - including "Preview Website" and "Log Out". The code for that is below:

echo "<h4>User Controls</h4>"; 
echo "<ul>"; 
	echo "<li><a href='index.php' target='_blank'>Preview Website</a></li>"; 
	echo "<li><a href='login.php?status=loggedout'>Log Out</a></li>"; 
echo "</ul>"; 

Another configuration option for TinyMCE you might be interested in is:

content_css: "sources/styles.css"

Add that inside your TinyMCE configuration and set the value to your stylesheet. With that, all the HTML that gets loaded in the TinyMCE editor will use your stylesheet. SO if your background color is black, the editor will display a black background as opposed to the default, white. It's just an easier way for you to see and edit your content.