What is a CMS?

A content management system is an application that is used to allow its authenticated users to create, read, update and delete content from a central source. Content management systems are often used in sites that involve blogs, shopping, and news.

Steps to Creating Your First CMS

Writing your first CMS can be overwhelming. But if we follow some general step by step guidelines, we can understand our priorities and plan accordingly.

  1. Creating the proposal/project specifications
    1. Understanding what data the CMS will be handling is key to creating a database schema. Write down what data is going to be needed, then move to a schema for the database.
    2. Note that this may be modified through the lifespan of the development cycle.
  2. Create the database
    1. Building on the schema you created previously, create the tables needed for your CMS.
    2. It’s a good idea to enter some data into your main table at this time.
  3. URL Rewrites
    1. At this time, you may want to create a configuration file which can handle issues like URL rewrites. This can be done at any time, however.
  4. Create connect.php
    1. Used to connect to the database and used for most pages of your CMS.
  5. Create index.php
    1. Your site’s homepage.
    2. Do a SELECT * and display the data in the page.
    3. This is a good base of operations. You can ensure your DB connection works, and your table(s) are well defined.
  6. Create admin.php
    1. This script will handle user authentications for future pages that will have create, update or delete permissions.
    2. For starters, you can use the server authentication that was used in the blog assignment. Further authentication, like using the database for credentials, should be added later on.
  7. Create admin pages
    1. Start with a page that can update data and save it to the database.
    2. Create a page that can delete content.
  8. Create templates
    1. Front-end templates like header.php and footer.php make updating pages easier. Common page elements should be created in these files and included on the pages that need them.
    2. Back-end templates may be something to consider. For instance, an edit page may have similar code across a multiple of tables. Encapsulating that code will aid in reusability and extensibility.
  9. Create the stylesheet
    1. Many new web developers will start with this step, when in a CMS application, it’s the least important component (although web designers may disagree with that!).
    2. The purpose of your CMS is a high level of functionality. Design will be our last step.

These steps here are of course just a shell. There may be points where you need to add more pages and functionality. Hopefully this can at least be a guideline for your first CMS application.