wordpress
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWordPress Development Workflow Bundle
WordPress开发工作流合集
Overview
概述
Comprehensive WordPress development workflow covering theme development, plugin creation, WooCommerce integration, performance optimization, and security. This bundle orchestrates skills for building production-ready WordPress sites and applications.
全面的WordPress开发工作流,涵盖主题开发、插件创建、WooCommerce集成、性能优化和安全防护。本合集整合了构建可投入生产环境的WordPress网站和应用所需的技能。
When to Use This Workflow
何时使用此工作流
Use this workflow when:
- Building new WordPress websites
- Creating custom themes
- Developing WordPress plugins
- Setting up WooCommerce stores
- Optimizing WordPress performance
- Hardening WordPress security
在以下场景使用此工作流:
- 构建新的WordPress网站
- 创建自定义主题
- 开发WordPress插件
- 搭建WooCommerce商店
- 优化WordPress性能
- 加固WordPress安全
Workflow Phases
工作流阶段
Phase 1: WordPress Setup
阶段1:WordPress环境搭建
Skills to Invoke
需调用的技能
- - Project scaffolding
app-builder - - Development environment
environment-setup-guide
- - 项目脚手架搭建
app-builder - - 开发环境配置
environment-setup-guide
Actions
操作步骤
- Set up local development environment (LocalWP, Docker, or Valet)
- Install WordPress
- Configure development database
- Set up version control
- Configure wp-config.php for development
- 搭建本地开发环境(LocalWP、Docker或Valet)
- 安装WordPress
- 配置开发数据库
- 搭建版本控制
- 为开发环境配置wp-config.php
Copy-Paste Prompts
可复制粘贴的提示词
Use @app-builder to scaffold a new WordPress project with modern toolingUse @app-builder to scaffold a new WordPress project with modern toolingPhase 2: Theme Development
阶段2:主题开发
Skills to Invoke
需调用的技能
- - Component development
frontend-developer - - UI implementation
frontend-design - - Styling
tailwind-patterns - - Performance
web-performance-optimization
- - 组件开发
frontend-developer - - UI实现
frontend-design - - 样式设计
tailwind-patterns - - 性能优化
web-performance-optimization
Actions
操作步骤
- Design theme architecture
- Create theme files (style.css, functions.php, index.php)
- Implement template hierarchy
- Create custom page templates
- Add custom post types and taxonomies
- Implement theme customization options
- Add responsive design
- 设计主题架构
- 创建主题文件(style.css、functions.php、index.php)
- 实现模板层级结构
- 创建自定义页面模板
- 添加自定义文章类型和分类法
- 实现主题自定义选项
- 添加响应式设计
Theme Structure
主题结构
theme-name/
├── style.css
├── functions.php
├── index.php
├── header.php
├── footer.php
├── sidebar.php
├── single.php
├── page.php
├── archive.php
├── search.php
├── 404.php
├── template-parts/
├── inc/
├── assets/
│ ├── css/
│ ├── js/
│ └── images/
└── languages/theme-name/
├── style.css
├── functions.php
├── index.php
├── header.php
├── footer.php
├── sidebar.php
├── single.php
├── page.php
├── archive.php
├── search.php
├── 404.php
├── template-parts/
├── inc/
├── assets/
│ ├── css/
│ ├── js/
│ └── images/
└── languages/Copy-Paste Prompts
可复制粘贴的提示词
Use @frontend-developer to create a custom WordPress theme with React componentsUse @tailwind-patterns to style WordPress theme with modern CSSUse @frontend-developer to create a custom WordPress theme with React componentsUse @tailwind-patterns to style WordPress theme with modern CSSPhase 3: Plugin Development
阶段3:插件开发
Skills to Invoke
需调用的技能
- - Backend standards
backend-dev-guidelines - - API design
api-design-principles - - Authentication
auth-implementation-patterns
- - 后端开发规范
backend-dev-guidelines - - API设计原则
api-design-principles - - 身份验证实现模式
auth-implementation-patterns
Actions
操作步骤
- Design plugin architecture
- Create plugin boilerplate
- Implement hooks (actions and filters)
- Create admin interfaces
- Add custom database tables
- Implement REST API endpoints
- Add settings and options pages
- 设计插件架构
- 创建插件模板
- 实现钩子(动作和过滤器)
- 创建后台管理界面
- 添加自定义数据库表
- 实现REST API端点
- 添加设置和选项页面
Plugin Structure
插件结构
plugin-name/
├── plugin-name.php
├── includes/
│ ├── class-plugin-activator.php
│ ├── class-plugin-deactivator.php
│ ├── class-plugin-loader.php
│ └── class-plugin.php
├── admin/
│ ├── class-plugin-admin.php
│ ├── css/
│ └── js/
├── public/
│ ├── class-plugin-public.php
│ ├── css/
│ └── js/
└── languages/plugin-name/
├── plugin-name.php
├── includes/
│ ├── class-plugin-activator.php
│ ├── class-plugin-deactivator.php
│ ├── class-plugin-loader.php
│ └── class-plugin.php
├── admin/
│ ├── class-plugin-admin.php
│ ├── css/
│ └── js/
├── public/
│ ├── class-plugin-public.php
│ ├── css/
│ └── js/
└── languages/Copy-Paste Prompts
可复制粘贴的提示词
Use @backend-dev-guidelines to create a WordPress plugin with proper architectureUse @backend-dev-guidelines to create a WordPress plugin with proper architecturePhase 4: WooCommerce Integration
阶段4:WooCommerce集成
Skills to Invoke
需调用的技能
- - Payment processing
payment-integration - - Stripe payments
stripe-integration - - Billing workflows
billing-automation
- - 支付处理集成
payment-integration - - Stripe支付集成
stripe-integration - - 账单自动化
billing-automation
Actions
操作步骤
- Install and configure WooCommerce
- Create custom product types
- Customize checkout flow
- Integrate payment gateways
- Set up shipping methods
- Create custom order statuses
- Implement subscription products
- Add custom email templates
- 安装并配置WooCommerce
- 创建自定义产品类型
- 自定义结账流程
- 集成支付网关
- 设置配送方式
- 创建自定义订单状态
- 实现订阅产品
- 添加自定义邮件模板
Copy-Paste Prompts
可复制粘贴的提示词
Use @payment-integration to set up WooCommerce with StripeUse @billing-automation to create subscription products in WooCommerceUse @payment-integration to set up WooCommerce with StripeUse @billing-automation to create subscription products in WooCommercePhase 5: Performance Optimization
阶段5:性能优化
Skills to Invoke
需调用的技能
- - Performance optimization
web-performance-optimization - - Database optimization
database-optimizer
- - 性能优化
web-performance-optimization - - 数据库优化
database-optimizer
Actions
操作步骤
- Implement caching (object, page, browser)
- Optimize images (lazy loading, WebP)
- Minify and combine assets
- Enable CDN
- Optimize database queries
- Implement lazy loading
- Configure OPcache
- Set up Redis/Memcached
- 实现缓存(对象缓存、页面缓存、浏览器缓存)
- 优化图片(懒加载、WebP格式)
- 压缩并合并资源文件
- 启用CDN
- 优化数据库查询
- 实现懒加载
- 配置OPcache
- 搭建Redis/Memcached
Performance Checklist
性能检查清单
- Page load time < 3 seconds
- Time to First Byte < 200ms
- Largest Contentful Paint < 2.5s
- Cumulative Layout Shift < 0.1
- First Input Delay < 100ms
- 页面加载时间 < 3秒
- 首字节时间 < 200ms
- 最大内容绘制 < 2.5秒
- 累积布局偏移 < 0.1
- 首次输入延迟 < 100ms
Copy-Paste Prompts
可复制粘贴的提示词
Use @web-performance-optimization to audit and improve WordPress performanceUse @web-performance-optimization to audit and improve WordPress performancePhase 6: Security Hardening
阶段6:安全加固
Skills to Invoke
需调用的技能
- - Security audit
security-auditor - - WordPress security testing
wordpress-penetration-testing - - Static analysis
sast-configuration
- - 安全审计
security-auditor - - WordPress安全测试
wordpress-penetration-testing - - 静态代码分析配置
sast-configuration
Actions
操作步骤
- Update WordPress core, themes, plugins
- Implement security headers
- Configure file permissions
- Set up firewall rules
- Enable two-factor authentication
- Implement rate limiting
- Configure security logging
- Set up malware scanning
- 更新WordPress核心、主题和插件
- 实现安全响应头
- 配置文件权限
- 设置防火墙规则
- 启用双因素认证
- 实现速率限制
- 配置安全日志
- 搭建恶意软件扫描
Security Checklist
安全检查清单
- WordPress core updated
- All plugins/themes updated
- Strong passwords enforced
- Two-factor authentication enabled
- Security headers configured
- XML-RPC disabled or protected
- File editing disabled
- Database prefix changed
- Regular backups configured
- WordPress核心已更新
- 所有插件/主题已更新
- 强制使用强密码
- 已启用双因素认证
- 已配置安全响应头
- XML-RPC已禁用或受保护
- 文件编辑已禁用
- 数据库前缀已修改
- 已配置定期备份
Copy-Paste Prompts
可复制粘贴的提示词
Use @wordpress-penetration-testing to audit WordPress securityUse @security-auditor to perform comprehensive security reviewUse @wordpress-penetration-testing to audit WordPress securityUse @security-auditor to perform comprehensive security reviewPhase 7: Testing
阶段7:测试
Skills to Invoke
需调用的技能
- - Test automation
test-automator - - E2E testing
playwright-skill - - Web app testing
webapp-testing
- - 测试自动化
test-automator - - 端到端测试
playwright-skill - - Web应用测试
webapp-testing
Actions
操作步骤
- Write unit tests for custom code
- Create integration tests
- Set up E2E tests
- Test cross-browser compatibility
- Test responsive design
- Performance testing
- Security testing
- 为自定义代码编写单元测试
- 创建集成测试
- 搭建端到端测试
- 测试跨浏览器兼容性
- 测试响应式设计
- 性能测试
- 安全测试
Copy-Paste Prompts
可复制粘贴的提示词
Use @playwright-skill to create E2E tests for WordPress siteUse @playwright-skill to create E2E tests for WordPress sitePhase 8: Deployment
阶段8:部署
Skills to Invoke
需调用的技能
- - Deployment
deployment-engineer - - CI/CD
cicd-automation-workflow-automate - - GitHub Actions
github-actions-templates
- - 部署实施
deployment-engineer - - CI/CD自动化
cicd-automation-workflow-automate - - GitHub Actions模板
github-actions-templates
Actions
操作步骤
- Set up staging environment
- Configure deployment pipeline
- Set up database migrations
- Configure environment variables
- Enable maintenance mode during deployment
- Deploy to production
- Verify deployment
- Monitor post-deployment
- 搭建预发布环境
- 配置部署流水线
- 搭建数据库迁移
- 配置环境变量
- 部署期间启用维护模式
- 部署到生产环境
- 验证部署结果
- 监控部署后状态
Copy-Paste Prompts
可复制粘贴的提示词
Use @deployment-engineer to set up WordPress deployment pipelineUse @deployment-engineer to set up WordPress deployment pipelineWordPress-Specific Workflows
WordPress专属工作流
Custom Post Type Development
自定义文章类型开发
php
register_post_type('book', [
'labels' => [...],
'public' => true,
'has_archive' => true,
'supports' => ['title', 'editor', 'thumbnail', 'excerpt'],
'menu_icon' => 'dashicons-book',
]);php
register_post_type('book', [
'labels' => [...],
'public' => true,
'has_archive' => true,
'supports' => ['title', 'editor', 'thumbnail', 'excerpt'],
'menu_icon' => 'dashicons-book',
]);Custom REST API Endpoint
自定义REST API端点
php
add_action('rest_api_init', function() {
register_rest_route('myplugin/v1', '/books', [
'methods' => 'GET',
'callback' => 'get_books',
'permission_callback' => '__return_true',
]);
});php
add_action('rest_api_init', function() {
register_rest_route('myplugin/v1', '/books', [
'methods' => 'GET',
'callback' => 'get_books',
'permission_callback' => '__return_true',
]);
});WooCommerce Custom Product Type
WooCommerce自定义产品类型
php
add_action('init', function() {
class WC_Product_Custom extends WC_Product {
// Custom product implementation
}
});php
add_action('init', function() {
class WC_Product_Custom extends WC_Product {
// Custom product implementation
}
});Quality Gates
质量关卡
Before moving to next phase, verify:
- All custom code tested
- Security scan passed
- Performance targets met
- Cross-browser tested
- Mobile responsive verified
- Accessibility checked (WCAG 2.1)
进入下一阶段前,需验证:
- 所有自定义代码已测试
- 安全扫描已通过
- 性能指标已达标
- 跨浏览器测试已完成
- 移动端响应式已验证
- 可访问性已检查(符合WCAG 2.1标准)
Related Workflow Bundles
相关工作流合集
- - General web development
development - - Security testing
security-audit - - Testing workflow
testing-qa - - E-commerce development
ecommerce
- - 通用Web开发
development - - 安全测试
security-audit - - 测试工作流
testing-qa - - 电商开发
ecommerce