Overview

WPZylos Scaffold is a template repository for creating WPZylos-based WordPress plugins.

What is WPZylos?

WPZylos is a modern PHP framework for WordPress plugin development. It provides:

  • MVC Architecture — Controllers, Services, Views separation
  • Dependency Injection — PSR-11 compliant container
  • Routing — Clean URL routing system
  • Database — Query builder and migrations
  • Security — Nonce, capabilities, sanitization utilities
  • PHP-Scoper — Namespace isolation for multi-plugin compatibility

Project Structure

your-plugin/
+-- app/                        # Application code (PSR-4)
¦   +-- Core/
¦   ¦   +-- PluginContext.php   # Plugin identity
¦   +-- Http/
¦   ¦   +-- Controllers/        # Request handlers
¦   +-- Providers/              # Service providers
¦   +-- Services/               # Business logic
¦   +-- Support/
¦       +-- helpers.php         # Global helpers
+-- bootstrap/
¦   +-- app.php                 # Bootstrap & providers
+-- config/
¦   +-- app.php                 # Configuration
+-- database/
¦   +-- migrations/             # Schema migrations
+-- app/
¦   +-- Activator.php           # Activation logic
¦   +-- Deactivator.php         # Deactivation logic
¦   +-- Uninstaller.php         # Uninstall cleanup
+-- resources/
¦   +-- lang/                   # Translations
¦   +-- views/                  # Templates
+-- routes/
¦   +-- web.php                 # Route definitions
+-- tests/                      # PHPUnit tests
+-- your-plugin.php             # Main entry point
+-- uninstall.php               # WordPress uninstall
+-- scoper.inc.php              # PHP-Scoper config
+-- Makefile                    # Build automation
+-- composer.json               # Dependencies

Getting Started

  1. Copy scaffold to new plugin directory
  2. Search/replace placeholders:
    • my-plugin ? your-plugin
    • MyPlugin ? YourPlugin
    • myplugin_ ? yourplugin_
  3. Run composer install
  4. Activate in WordPress admin

Build Pipeline

# Development
composer install

# Production (with PHP-Scoper)
make build

# Create distributable ZIP
make release

Files to Customize

FilePurpose
your-plugin.phpPlugin headers, slug, prefix
config/app.phpApplication config
routes/web.phpRoute definitions
app/Providers/Service providers
composer.jsonPackage name, namespace
scoper.inc.phpScoper prefix
MakefilePlugin slug