{"id":23380458,"url":"https://github.com/ploverhub/wpengine-gitpush-deploy","last_synced_at":"2025-10-15T14:38:14.175Z","repository":{"id":269174052,"uuid":"906617625","full_name":"PloverHub/wpengine-gitpush-deploy","owner":"PloverHub","description":"Bash scripting to automate deployment onto WP Engine","archived":false,"fork":false,"pushed_at":"2025-06-26T22:15:01.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T23:13:48.282Z","etag":null,"topics":["bash-scripts","wordpress","wordpress-development","wpengine","wpengine-git-push"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PloverHub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-21T12:10:28.000Z","updated_at":"2025-06-26T22:15:04.000Z","dependencies_parsed_at":"2024-12-21T14:25:52.728Z","dependency_job_id":"4d2e087d-410f-41bd-a9a5-b0f4eefa51b2","html_url":"https://github.com/PloverHub/wpengine-gitpush-deploy","commit_stats":null,"previous_names":["ploverhub/wpengine-gitpush-deploy"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/PloverHub/wpengine-gitpush-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PloverHub%2Fwpengine-gitpush-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PloverHub%2Fwpengine-gitpush-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PloverHub%2Fwpengine-gitpush-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PloverHub%2Fwpengine-gitpush-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PloverHub","download_url":"https://codeload.github.com/PloverHub/wpengine-gitpush-deploy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PloverHub%2Fwpengine-gitpush-deploy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262179023,"owners_count":23271155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-scripts","wordpress","wordpress-development","wpengine","wpengine-git-push"],"created_at":"2024-12-21T20:15:57.282Z","updated_at":"2025-10-15T14:38:09.153Z","avatar_url":"https://github.com/PloverHub.png","language":"Shell","readme":"# WP Engine Deployment Scripts\n\nA structured Bash + Makefile toolkit for automating WordPress deployments to WP Engine environments. It includes environment bootstrapping, repository preparation (Composer, cleanup), and Git pushing to environment-specific remotes. Configuration is centralized in `config/env.sh`.\n\n---\n\n## Table of Contents\n\n1. [Introduction](#introduction)\n2. [Project Structure](#project-structure)\n3. [Requirements](#requirements)\n4. [Setup](#setup)\n5. [Configuration](#configuration)\n6. [Usage](#usage)\n7. [GPG Workflow (Optional)](#gpg-workflow-optional)\n8. [Optional Bash Aliases](#optional-bash-aliases)\n9. [Contributing](#contributing)\n10. [License](#license)\n11. [Changelog](#changelog)\n\n---\n\n## Introduction\n\nThis repository provides a robust and reusable set of scripts to manage WordPress deployments to WP Engine. Instead of manually coordinating Git commands and Composer actions, use structured Make targets and Bash tasks to deploy to `dev`, `stag`, or `prod`.\n\n---\n\n## Project Structure\n\n```bash\n.\n├── Makefile                  # Task-based CLI entry point\n├── config/\n│   ├── env.sh                # Project-specific settings\n│   └── example.env.sh        # Template for new projects\n├── deploy/\n│   ├── deploy.sh             # Main script: init, prep, push, deploy\n│   ├── header.sh             # Strict-mode, path detection, config loader\n│   └── file_templates/\n│       └── gitignore_wpe     # Gitignore template for WP Engine\n├── README.md\n├── LICENSE\n└── CHANGELOG.md\n```\n\n---\n\n## Requirements\n\n* Bash (or Zsh)\n* Git\n* Composer\n* GPG (optional)\n* WP Engine Git access\n\n---\n\n## Setup\n\n1. Clone this repo:\n\n   ```bash\n   git clone git@github.com:PloverHub/wpengine-gitpush-deploy.git\n   cd yourrepo\n   ```\n\n2. Copy and configure your environment:\n\n   ```bash\n   cp config/example.env.sh config/env.sh\n   ```\n\n   Edit `config/env.sh` with your actual repo and WP Engine remotes.\n\n3. Make sure scripts are executable:\n\n   ```bash\n   chmod +x deploy/*.sh\n   ```\n\n---\n\n## Configuration\n\nEdit `config/env.sh` and fill in your project-specific values:\n\n```bash\nexport BLOG_GIT_REPO=\"git@github.com:YOURORG/YOURPROJECT.git\"\nexport WPE_GIT_DEV=\"git@git.wpengine.com:production/dev-repo.git\"\nexport WPE_SSH_DEV=\"ssh user@dev.ssh.wpengine.net\"\n...\nexport RUN_GPG_DECRYPT=\"true\"\n```\n\nAlso define the list of files to delete before deploying.\n\n---\n\n## Usage\n\nRun all deployment tasks via Make:\n\n```bash\nmake dev init        # Clone repo and (optionally) decrypt .env\nmake dev prep        # Composer install + file cleanup\nmake dev push        # Git remote setup + push\n\n## OR just:\n\nmake dev deploy      # Full init + prep + push\n```\n\nReplace `dev` with `stag` or `prod` as needed.\n\n---\n\n## GPG Workflow (Optional)\n\nIf your `.env` files are GPG-encrypted, you can enable decryption:\n\n### 1. Enable it in `env.sh`:\n\n```bash\nexport RUN_GPG_DECRYPT=\"true\"\n```\n\n### 2. Place encrypted envs:\n\n```bash\nwp-content/app/config/env_dev.gpg\nwp-content/app/config/env_stag.gpg\nwp-content/app/config/env_prod.gpg\n```\n\n### 3. Provide your GPG passphrase file:\n\n```bash\n~/.paraphrase_gpg\n```\n\nThe script will automatically:\n\n* Detect the environment (dev/stag/prod)\n* Decrypt `env_\u003cENV\u003e.gpg`\n* Output it to the configured `WP_ENV_PATH`\n\n\u003e Make sure GPG is installed and configured properly with your keypair.\n\n---\n\n## Optional Bash Aliases\n\n```bash\nalias wpe.prod=\"make prod deploy\"\nalias wpe.stag=\"make stag deploy\"\nalias wpe.dev=\"make dev deploy\"\n```\n\nReload shell:\n\n```bash\nsource ~/.zshrc  # or ~/.bashrc\n```\n\n---\n\n## Contributing\n\n1. Fork the repo\n2. Create a branch: `feature/my-change`\n3. Use Conventional Commits\n4. Submit a pull request\n\n---\n\n## License\n\nSee [LICENSE](LICENSE)\n\n---\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fploverhub%2Fwpengine-gitpush-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fploverhub%2Fwpengine-gitpush-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fploverhub%2Fwpengine-gitpush-deploy/lists"}