Skip to content

[DevOps] Set Up Git Version Control for Theme #47

@claudyfaucant

Description

@claudyfaucant

Current State

  • Theme not in version control
  • Changes made directly in WP Admin
  • No staging workflow documented
  • No automated testing

Recommended Solution

1. Version Control Theme

  • Export current theme (wp-starter) to this repo
  • Set up proper .gitignore for WP-specific files

2. WP Engine Git Push

WP Engine supports Git deployment. Configure remotes using the install names from WP Engine portal:

git remote add wpengine git@git.wpengine.com:production/<install-name>.git
git remote add staging git@git.wpengine.com:staging/<staging-install-name>.git

3. GitHub Actions Workflow

name: Deploy to WP Engine Staging
on:
  push:
    branches: [staging]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Deploy to WP Engine
        uses: wpengine/github-action-wpe-site-deploy@v3
        with:
          WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY }}
          WPE_ENV: staging

4. Workflow

Feature Branch → PR → Review → Merge to staging → Auto-deploy to staging → QA → Merge to main → Deploy to production

Benefits

  • Change history and accountability
  • Easy rollback to any previous version
  • PR review before production
  • Automated deployments

Future Enhancements

  • Visual regression testing (Percy/BackstopJS)
  • Lighthouse CI for performance
  • Security scanning

Acceptance Criteria

  • Theme exported to repo
  • Git push configured for WP Engine
  • GitHub Actions workflow created
  • Deployment process documented

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions