Php Microsite Boilerplate screenshot

Php Microsite Boilerplate

Author Avatar Theme by Jekuer
Updated: 23 Dec 2024
194 Stars

An extremely simple and lightweight PHP framework/boilerplate to spin-up microsites at high speed. Optimized for Performance, Security, SEO, TailwindCSS, and Directus CMS.

Categories

Overview

PHP Microsite Boilerplate is a PHP framework designed to simplify the process of creating fast, secure, and functional websites. Unlike other frameworks and boilerplates, this one has a minimal setup process and does not require the installation of multiple dependencies. It is suitable for small websites with limited functionality and is compatible with various hosting options. The framework includes features like easy routing, Progressive Web App (PWA) compatibility, Multilanguage support, Directus CMS integration, Docker compose for local development, TailwindCSS integration, GDPR and CCPA readiness, intelligent serviceworker cache, SEO optimization, automated sitemap generation, and more.

Features

  • Easy routing: Simplifies the process of defining routes for web pages.
  • Progressive Web App (PWA) prepared: Allows websites to provide a native app-like experience to users.
  • Multilanguage prepared: Supports creating websites in multiple languages.
  • Directus CMS integration (incl. local cache): Integrates Directus CMS and includes a local cache for improved performance.
  • Docker compose for local development: Provides a convenient way to set up a local development environment using Docker.
  • TailwindCSS included (optional): Includes the TailwindCSS framework for easier styling (optional to use).
  • GDPR and CCPA ready: Offers built-in features and functionality to ensure compliance with GDPR and CCPA regulations.
  • Intelligent serviceworker cache: Optimizes caching using the service worker feature for improved performance.
  • Gettext support for easy translation (+ fallback if not installed on the server): Supports easy translation of website content using Gettext, with fallback support if Gettext is not installed on the server.
  • SEO optimized: Includes optimizations for search engine optimization to improve website visibility.
  • Automated sitemap generation: Generates sitemaps automatically for easier website indexing by search engines.
  • Optimized for Social sharing: Designed to optimize the sharing of website content on social media platforms.
  • Speed- & GDPR-optimized YouTube Integration: Includes an optimized integration with YouTube videos for improved performance and GDPR compliance.
  • Optional CSS and JavaScript optimization with prepared build scripts: Provides the option to optimize CSS and JavaScript files using prepared build scripts.
  • Extensive in-code documentation: Offers comprehensive documentation within the code for easier understanding and customization.
  • Security Headers (.htaccess or via PHP): Provides security headers setup options either through .htaccess files or via PHP.
  • Multiple security features (most of them require an Apache server!): Includes various security features for enhanced website security (most features require an Apache server).
  • Prepared to run git deployment: Facilitates the deployment of websites using git.
  • Developed to make it extremely easy for you to remove features or add your own things: Ensures flexibility in customizing the framework by making it easy to remove or add features.

Installation

  1. Download the respective branch/tag of the PHP Microsite Boilerplate from the repository.
  2. Upload the downloaded files to your website’s folder or clone the repository.
  3. Adjust the .htaccess file for Apache servers, including the security headers and any domain/path specifications.
  4. If not running on Apache, check the index.php file for the security headers setup and ensure that every request (except for files) is sent to the index.php. You can also refer to the nginx_deployment.sh file, which is a pre-configured bash script for setting up the Nginx webserver.
  5. Adjust the values within the config.php file, including setting up a connection to your Directus CMS (if used).
  6. Check and create the relevant favicons by modifying the /templates/general_meta.php file.
  7. Define your website’s pages in the routing.php file, ensuring compliance with legal notice and privacy policy requirements.
  8. Create the necessary pages as single PHP files within the /pages directory.
  9. Modify and customize the framework by removing or adding features as desired.

Summary

PHP Microsite Boilerplate is a lightweight PHP framework that simplifies the process of creating small, functional websites. It offers a range of features such as easy routing, PWA compatibility, Multilanguage support, Directus CMS integration, Docker compose for local development, TailwindCSS integration, GDPR readiness, intelligent serviceworker cache, SEO optimization, and more. The framework provides a convenient and secure solution for developers looking to quickly build websites without the complexities of traditional frameworks.