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.
- 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.
- A web server with PHP support (e.g., Apache, Nginx).
- PHP 7.0 or higher.
- Basic knowledge of PHP and web development.
-
Download flashCMS:
git clone https://github.com/srpiroliro/flash_cms.git cd flashcms
-
Upload to Server: Upload all files to your web server using FTP or another method.
-
Set Permissions: Ensure that the web server has write permissions to the content directory:
chmod -R 755 /path/to/flashcms/content
-
Configure Server: Ensure your web server is configured to serve PHP files and that the document root is set to the directory containing flashCMS.
-
Adding a New Page:
- Create a new
.php
file in thecontent
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'; ?>
- Create a new
-
Editing an Existing Page:
- Open the corresponding
.php
file in thecontent
directory. - Make your changes and save the file.
- Open the corresponding
-
Deleting a Page:
- Remove the corresponding
.php
file from thecontent
directory.
- Remove the corresponding
-
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.
- Edit the
-
Adding Styles and Scripts:
- Place your CSS files in the
css
directory and your JavaScript files in thejs
directory. - Link to these files in the
template.php
file.
- Place your CSS files in the
-
Configuring Settings:
- Modify the
config.php
file to change basic settings like site name, default language, etc.
- Modify the
- 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.
- 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.
Contributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request.