phycticio/wp-boilerplate
Composer 安装命令:
composer create-project phycticio/wp-boilerplate
包简介
WordPress boilerplate with Composer, easier configuration, and an improved folder structure
README 文档
README
Modern template for WordPress development with scalable architecture and updated technology stack.
Key Features
- 🚀 Modern Stack: PHP 8.1+, Node 18+, Composer 2+, pnpm
- 🧩 Dependency Management:
- Plugins managed via Composer
- Assets with Webpack 5 and ES6+
- 🧱 Block Theme:
- Native blocks with React
- Full Site Editing (FSE)
- Complete frontend/backend integration
- 📐 Clean Architecture:
- MVC pattern with Twig templating
- Environment-based configuration
- Clear separation of responsibilities
- ⚙️ Professional Workflow:
- Integrated GitHub Actions
- PHP Code Standards (Pint)
- Multi-environment Webpack
Prerequisites
- PHP 8.1+
- Node.js 18+
- Composer 2.2+
- pnpm 8+
Quick Installation
composer create-project phycticio/wp-boilerplate project-name
cd project-name
cp sample.env .env
pnpm install
pnpm run build
Configuration
Environments
- Edit
.envwith your variables - Configure environments in
config/environments/development.php: Local configproduction.php: Production config
Main Files
config/application.php: Shared configurationweb/wp-config.php: WordPress Bootstrapapp/App.php: Theme initializer
Directory Structure
wp-boilerplate/
├── .github/ # GitHub Actions workflows
├── app/ # Application logic
│ ├── Features/ # Traits and functionalities
│ ├── Hooks/ # WordPress hooks
│ ├── Services/ # Services and DB interactions
│ └── App.php # Main initializer
├── config/ # Configurations
│ ├── environments/ # Environment variables
│ ├── application.php # Base config
│ └── webpack.*.js # Webpack configurations
├── resources/ # Assets and templates
│ ├── blocks/ # Custom blocks
│ ├── scripts/ # JS entry points
│ ├── scss/ # Global styles
│ └── views/ # Twig templates
├── web/ # Web root
│ ├── content/ # WP content directory
│ └── wp/ # Core WordPress
└── [config files] # Global configurations
Development
Main Commands
# Install dependencies pnpm install # Development with hot-reload pnpm run dev # Production build pnpm run build # Lint PHP pnpm run lint # Format code pnpm run format
Block Creation
- Add new block in
resources/blocks/ - Use WordPress
registerBlockType - Import styles/scripts in Webpack config
Twig Templates
// Example usage in WordPress View::render('template-name', ['data' => $values]);
GitHub Actions Workflow
- Lint: PHP/JS code verification
- Build: Asset compilation
- Deploy: Configurable for different environments
Coding Standards
- PHP: PHP-CS-Fixer (config in
pint.json) - JS: ESLint with standard config
- Styles: SCSS with SMACSS structure
Contribution
- Fork the project
- Create feature branch (
feat/my-feature) - Submit Pull Request
License
GPL-3.0. See LICENSE for details.
Changelog
See CHANGELOG.md for version history.
phycticio/wp-boilerplate 适用场景与选型建议
phycticio/wp-boilerplate 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 28, 最近一次更新时间为 2025 年 03 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「composer」 「wordpress」 「boilerplate」 「wp」 「wp-config」 「mody」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 phycticio/wp-boilerplate 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 phycticio/wp-boilerplate 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 phycticio/wp-boilerplate 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP class to extend when building a WordPress plugin allowing you to follow smart plugin setup standards.
Anax htmlform module.
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
Laravel 5.7 Boilerplate based on Bootstrap 4 and Tabler for Backend.
WordPress Plugin Framework
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 28
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-13