srpiroliro / flash_cms

An CMS system made as my high-school graduation project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flashCMS: A Lightweight File-Based CMS

Overview

flashCMS is a custom content management system (CMS) built with PHP. Unlike traditional CMS platforms that rely on databases, flashCMS manages content using files, making it lightweight and easy to deploy. This README provides an overview of flashCMS, setup instructions, and details on how to use the system.

Features

  • File-Based Storage: Manages content using files, eliminating the need for a database.
  • Easy to Deploy: Simply upload the files to your server, and you're ready to go.
  • Lightweight: Minimal overhead, ideal for small to medium-sized websites.
  • Flexible: Easily customizable to fit your specific needs.
  • Secure: Simple security measures to protect your content.

Prerequisites

  • A web server with PHP support (e.g., Apache, Nginx).
  • PHP 7.0 or higher.
  • Basic knowledge of PHP and web development.

Installation

  1. Download flashCMS:

    git clone https://github.com/srpiroliro/flash_cms.git
    cd flashcms
  2. Upload to Server: Upload all files to your web server using FTP or another method.

  3. Set Permissions: Ensure that the web server has write permissions to the content directory:

    chmod -R 755 /path/to/flashcms/content
  4. Configure Server: Ensure your web server is configured to serve PHP files and that the document root is set to the directory containing flashCMS.

Usage

Creating and Managing Content

  1. Adding a New Page:

    • Create a new .php file in the content directory.
    • Use the following template to structure your content:
      <?php
      $title = "Page Title";
      $content = "
      <h1>Page Heading</h1>
      <p>Your content goes here.</p>
      ";
      include 'template.php';
      ?>
  2. Editing an Existing Page:

    • Open the corresponding .php file in the content directory.
    • Make your changes and save the file.
  3. Deleting a Page:

    • Remove the corresponding .php file from the content directory.

Customizing the CMS

  1. Modifying the Template:

    • Edit the template.php file to change the layout or design of your site.
    • Use standard HTML and PHP to customize the header, footer, and other elements.
  2. Adding Styles and Scripts:

    • Place your CSS files in the css directory and your JavaScript files in the js directory.
    • Link to these files in the template.php file.
  3. Configuring Settings:

    • Modify the config.php file to change basic settings like site name, default language, etc.

Security

  • File Permissions: Ensure that your content files and directories have the appropriate permissions to prevent unauthorized access.
  • Input Validation: Validate any user inputs to prevent XSS and other vulnerabilities.
  • Backup: Regularly backup your content directory to avoid data loss.

Troubleshooting

  • Page Not Found: Ensure that the file exists in the content directory and that the URL is correct.
  • Permission Issues: Verify that the web server has the necessary permissions to read and write files in the content directory.
  • PHP Errors: Check the server's error logs for PHP error messages and address them accordingly.

Contributing

Contributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request.

About

An CMS system made as my high-school graduation project.


Languages

Language:PHP 84.3%Language:Hack 9.0%Language:JavaScript 3.5%Language:CSS 3.2%