Development Workflow
Environments
Section titled “Environments”| Environment | Purpose | URL pattern |
|---|---|---|
| Local | Development. Write code here. | https://{site}.local |
| Staging | Testing changes, client review. | https://{site}.dev.onpressidium.com |
| Production | Live site. | https://{domain}.com |
The flow
Section titled “The flow”Staging ──pull.sh──→ Local ──code──→ Git push ──→ Production-
Pull from staging — Run
pull.shfrom the Local Site Shell to sync the staging database and files down to your local environment. See Pull Script. -
Develop locally — Make changes in Local. Preview at
https://{site}.local. -
Push to Git — Commit and push to the GitHub repository. This triggers deployment to production.
-
Test on staging — Staging is for testing changes before they go live, or for client review. It has its own database and can diverge from production.
Local development setup
Section titled “Local development setup”- Install Local by WP
- Create a new site (or import an existing one)
- Clone the theme repo into
wp-content/themes/ - Open Site Shell in Local (click the site → “Open Site Shell”)
- Run
bash pull.shto sync the staging database and files
Important notes
Section titled “Important notes”- Always pull from staging before starting work to ensure your local database is current.
- The
pull.shscript handles database export, download, table prefix fixing, URL search-replace, and file sync automatically. - WP-CLI commands (
wp) must be run from the Local Site Shell — it provides the MySQL connection and PHP environment.