Files
plugi-docs/GettingStarted.md
2026-11-27 17:23:32 +01:00

3.3 KiB

Getting Started

This guide introduces Plugi and links to the complete installation guide, which covers fresh manual deployments and local Docker development.

Requirements

  • PHP 8.4 with the PDO MySQL extension
  • MySQL 8.0 or a compatible MySQL server
  • Apache with the required routing support for a manual deployment
  • Docker Compose for the optional local development stack

Setup summary

  1. Copy .env.dist to .env and config.dist.php to config.php.
  2. Set the database connection, public base URL, and admin credentials in .env.
  3. Create an empty database and a dedicated database user, then make uploads/ writable by the web-server user.
  4. Open the site and sign in at /admin/auth.
  5. Use the Website Manager database update flow to create or update the schema.

See the installation guide for exact environment variable names, database provisioning, the schema update process, production security, and Docker-specific steps. The supplied Compose stack is for local development only.

First Steps

After logging in, you will see the Website Manager dashboard. From here you can:

  • Create pages — Add new pages with custom routes and titles.
  • Edit pages — Use the drag-and-drop Page Builder (powered by GrapesJS) to design your pages visually.
  • Manage blocks — Drag blocks from the block library onto your pages. Blocks are defined by your active theme.
  • Configure settings — Adjust general settings, select a theme, and manage extensions from the admin panel.
  • Manage menus — Create and assign navigation menus.
  • Upload files — Manage uploaded assets from the Files tab.

Project Structure

A typical Plugi project has the following structure:

project-root/
├── index.php              # Entry point
├── config.php             # Configuration (copied from config.dist.php)
├── .env                   # Environment variables
├── plugi-core/            # Core framework files
├── extensions/            # Extensions (plugins)
│   ├── plugi-ext-form/    #   Form extension
│   └── plugi-ext-sitemap/ #   Sitemap extension
├── themes/                # Themes
│   └── theme-one/         #   Active theme
│       ├── blocks/        #     Theme blocks
│       ├── layouts/       #     Page layouts
│       ├── pages/         #     Static pages (e.g. 404.php)
│       └── dist/          #     Compiled CSS/JS
├── uploads/               # User-uploaded files
└── docs/                  # Documentation

Production Checklist

Before deploying to production:

  1. Set STAGE=production in your .env file to disable error reporting.
  2. Set a unique admin username and a PASSWORD_HASH in .env; do not use the legacy plaintext PASSWORD setting in production.
  3. Enable caching in config.php (cache.enabled => true) for better performance.
  4. Ensure the uploads/ directory is writable but not executable.
  5. Configure the web server to serve uploaded files safely; do not allow uploaded PHP files to execute.

Next Steps

  • Learn how to configure Plugi in detail.
  • Discover how to create custom themes.
  • Build your own extensions to add functionality.