Deployment
Deployment Methods
| Method | Use Case |
|---|---|
| Git push | Theme updates, plugin code, documentation |
| WP-CLI | Database changes, plugin activation |
deploy.sh | Canonical child-theme sync to GC-SG-M8 |
| Direct edit | Emergency fixes (rare) |
| Cloudflare Pages | Docusaurus documentation sites |
Deployment Flow
Local theme repo → PHP/CSS validation
→ `deploy.sh` theme sync to `GC-SG-M8`
→ WP-CLI for GP Element database changes
→ Clear only required caches
→ Origin verification
→ Optional Git commit/push
Cache Invalidation
| Cache Layer | Invalidation Method |
|---|---|
| LiteSpeed Cache | Purge all via admin or WP-CLI |
| Cloudflare | Cache purge via API or dashboard |
| Browser cache | Versioned asset URLs (automatic) |
Rollback Process
- Revert the local Git commit or restore the previous theme revision.
- Re-run
deploy.shto restore theme files. - Re-publish the previous GP Element and draft the replacement when the change is element-driven.
- Restore the database/files backup only when database or production files need to be recovered.
- Purge required caches and verify origin functionality.
Post-Deployment Checks
- Front page loads correctly
- Previous homepage Elements remain preserved as drafts when replaced
- Contact form submits successfully
- Member access works
- Search functions
- Analytics tracking active
- No PHP errors in logs
- Cache warming complete