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
- Copy scaffold to new plugin directory
- Search/replace placeholders:
my-plugin?your-pluginMyPlugin?YourPluginmyplugin_?yourplugin_
- Run
composer install - Activate in WordPress admin
Build Pipeline
# Development
composer install
# Production (with PHP-Scoper)
make build
# Create distributable ZIP
make release
Files to Customize
| File | Purpose |
|---|---|
your-plugin.php | Plugin headers, slug, prefix |
config/app.php | Application config |
routes/web.php | Route definitions |
app/Providers/ | Service providers |
composer.json | Package name, namespace |
scoper.inc.php | Scoper prefix |
Makefile | Plugin slug |
Related Packages
- wpzylos-core — Application foundation
- wpzylos-container — Dependency injection
- wpzylos-routing — URL routing
- wpzylos-database — Database abstraction
- wpzylos-security — Security utilities