PHPackages                             xwp/vip-go-site - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. xwp/vip-go-site

ActiveProject

xwp/vip-go-site
===============

VIP Go site environment

34828[9 issues](https://github.com/xwp/vip-site-template/issues)[19 PRs](https://github.com/xwp/vip-site-template/pulls)PHPCI passing

Since May 12Pushed 2mo ago30 watchersCompare

[ Source](https://github.com/xwp/vip-site-template)[ Packagist](https://packagist.org/packages/xwp/vip-go-site)[ RSS](/packages/xwp-vip-go-site/feed)WikiDiscussions main Synced 2mo ago

READMEChangelogDependenciesVersions (22)Used By (0)

WordPress/VIP Site Template
===========================

[](#wordpressvip-site-template)

Site setup, development environment and deploy tooling for [WordPress VIP](https://docs.wpvip.com/technical-references/vip-platform/):

- Uses Composer for adding project dependencies, including plugins and themes.
- Uses Composer autoloader for using any of the popular PHP packages anywhere in the codebase.
- Includes a local development environment based on Docker with support for PHP Xdebug and a mail catcher.
- Includes automated build and deploy pipelines to WordPress VIP Go using GitHub Actions.

Links &amp; Resources
---------------------

[](#links--resources)

- [VIP Go dashboard](https://dashboard.wpvip.com)
- [VIP Go documentation](https://docs.wpvip.com)
- [NewRelic dashboard](https://rpm.newrelic.com)
- [VIP upstream GitHub repository](#)

Requirements
------------

[](#requirements)

- PHP 8.3
- [Composer](https://getcomposer.org)
- [Node.js](https://nodejs.org) version 20
- [Docker with Docker Compose](https://docs.docker.com/compose/install/)
- [rsync](https://rsync.samba.org) for deployments

### Install Dependencies

[](#install-dependencies)

We suggest using [Homebrew](https://brew.sh) on macOS or [Chocolatey](https://chocolatey.org) for Windows to install the project dependencies.

```
brew install git php@8.3 composer node@20 mkcert nss
brew install --cask docker

```

Once NVM is installed, you can install the required Node.js version from the `.nvmrc` file:

```
nvm install
nvm use

```

### WordPress Compatibility

[](#wordpress-compatibility)

This theme template is aligned with WordPress 6.9.x package versions. To update packages to match a different WordPress version: `npx wp-scripts packages-update --dist-tag=wp-[version] --save`

### Code Editor and Git Client

[](#code-editor-and-git-client)

This repository includes a list of suggested extensions for the [Visual Studio Code editor](https://code.visualstudio.com) and Xdebug support in the `.vscode` directory.

A user-friendly Git client such as [GitHub Desktop](https://desktop.github.com) or [Tower](https://www.git-tower.com/mac) enables smaller commits and simplifies merge conflict resolution.

Overview
--------

[](#overview)

- Project plugins and themes can be added as Composer dependencies or manually to this repository under `plugins/your-plugin` and `themes/your-theme`.
- Composer dependencies are placed under `plugins/vendor` since it has to be in the same location relative to the project root (which is not the case for `vip-config`, which is mapped to the WP root directory on the server).
- Composer autoloader `plugins/vendor/autoload.php` is included in `vip-config/vip-config.php`.

Initial Setup
-------------

[](#initial-setup)

**Important:** This section can be deleted once you've completed the initial setup from the VIP Go Site template.

The site project generated from this template is designed to be hosted under the [WP VIP GitHub organization](https://github.com/wpcomvip) which is why it uses GitHub Actions for deployments - [GitHub Action based workflow](.github/workflows).

### VIP Platform Configuration

[](#vip-platform-configuration)

The following configuration must be requested from VIP Go to use this site repository:

1. Deployments from `*-built` branches such as `main-built` and `develop-built`.
2. Staging environment tracking the `develop-built` branch.

### VIP Repository Setup

[](#vip-repository-setup)

1. Ensure that VIP has configured the site to deploy from the `*-built` branches.
2. Create a fresh local Git repository from this reference repository:

    ```
     composer create-project xwp/vip-site-template --stability dev

    ```
3. Add your theme and plugins as Composer dependencies:

    ```
     composer require your/theme your/plugin another/plugin

    ```

    or by manually copying them to `themes` or `plugins`. Remember to start tracking those directories by excluding them in `themes/.gitignore` and `plugins/.gitignore`.
4. Adjust strings and URLs in all files match your project. Search and replace the following strings: `xwp/vip-site-template`, `xwp-vip-site-template`, `wpcomvip/devgo-vip`, `XWP\VIP_Site_Template`, `network.local.wpenv.net`, `main.local.wpenv.net`, `XWP_VIP_Site_Template`, `xwp/example-theme`, `themes/example-theme` `example-theme`.
5. If hosting this source repository under the [VIP GitHub organization](https://github.com/wpcomvip), add the VIP Go upstream repository as another remote to this repository locally and force-push the current `main` to that upstream repository to override the `main` branch with this. Do the same for the `develop` branch.

    For hosting this source repository under any other GitHub organization, simply push it to that repository.
6. Generate a fresh SSH key pair and add the private part [as a `DEPLOY_SSH_KEY` GitHub Actions secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets), and the public part as the [Deploy key to the VIP GitHub repository](https://docs.github.com/en/developers/overview/managing-deploy-keys).

    ```
     ssh-keygen -f deploy-key -t rsa -b 4096 -C "technology+project-name@xwp.co"

    ```

    This provides GitHub Actions with access to the VIP repository for deployments.
7. Remove references to either GitHub actions from this README depending on which deploy strategy was selected.
8. Remove these initial setup instructions from the README after the initial project setup.

Setup 🛠
-------

[](#setup-)

1. Clone this repository:

    ```
     git clone git@github.com:xwp/vip-site-template.git devgo-vip

    ```
2. Move into the project directory:

    ```
     cd devgo-vip

    ```
3. Install the project dependencies:

    ```
     npm install

    ```
4. Install ssl certificate to add the certificate authority of the development environment [`local/data/mkcert/rootCA.pem`](local/data/mkcert/rootCA.pem) to the trusted list on your computer. Alternatively, [configure it manually](https://support.apple.com/guide/keychain-access/add-certificates-to-a-keychain-kyca2431/mac).

    ```
     npm run install-cert

    ```
5. Start the development environment using Docker:

    ```
     npm run start

    ```

    and `npm run stop` to stop the virtual environment at any time. Run `npm run start-debug` to start the environment in debug mode where all output from containers is displayed. Run `npm run stop-all` to stop all active Docker containers in case you're running into port conflicts.
6. Install the local WordPress environment:

    ```
     npm run setup

    ```

    with the configuration from `wp-cli.yml`.
7. Visit [network.local.wpenv.net](https://network.local.wpenv.net) for the network admin or [main.local.wpenv.net](https://main.local.wpenv.net) for the main site. WordPress username `devgo` and password `devgo`.
8. Visit [mail.local.wpenv.net](https://mail.local.wpenv.net) to view all emails sent by WordPress.

The local development environment uses a self-signed SSL certificate for HTTPS so the "Your connection is not private" error can be ignored to visit the site.

### Resolving Port Conflicts

[](#resolving-port-conflicts)

Docker engine shares the networking interface with the host computer, so all the ports used by the containers must be free and unused by any other services such as a DNS resolver on port 53, MySQL service on port 3306 or another web server running on port 80.

Use the included `npm run stop-all` command to stop all containers running Docker containers on the host machine. Alternatively, you can adjust the port mappings in `docker-compose.yml` to expose different ports on the host machine.

Contribute
----------

[](#contribute)

1. Setup the local environment environment as described in the "Setup" section above.
2. Create a Git branch such as `feature/name` or `fix/vertical-scroll` when you start working on a feature or a bug fix. You can use the `develop` branch for your own testing and development.
3. Open [a pull request](https://help.github.com/en/desktop/contributing-to-projects/creating-a-pull-request) from your feature branch to the `main` branch for code review.
4. Review any feedback from the automated checks (linting, testing).
5. Once approved, **squash and merge** the PR into `main`. This automatically deploys to the test environment.

Plugins and Themes
------------------

[](#plugins-and-themes)

Add new themes and plugins as Composer dependencies:

```
composer require your/theme your/plugin another/plugin

```

or manually copy them to `themes`, `plugins` or `client-mu-plugins` directories. Remember to start tracking the directories copied manually by excluding them from being ignored in `themes/.gitignore` and `plugins/.gitignore`.

Use `client-mu-plugins/plugin-loader.php` to force-enable certain plugins.

To update plugins and themes added as Composer dependencies, use `composer install package/name` or `composer install --dev package/name` where `package/name` is the name of the plugin or theme package. Be sure to commit the updated `composer.json` with `composer.lock` to the GitHub repository.

For manually installed plugins and themes replace the directory with the updated set of files and commit them to the GitHub repository.

Local Development Environment
-----------------------------

[](#local-development-environment)

We use Docker containers to replicate the VIP Go production environment with all VIP dependencies added as Composer packages and mapped to specific directories inside the containers as defined in `docker-compose.yml`.

Requests to port 80 of the container host are captured by an Nginx proxy container that routes all requests to the necessary service container based on the HTTP hostname.

### Importing and Exporting Data

[](#importing-and-exporting-data)

Use [VIP dashboard or VIP-CLI](https://docs.wpvip.com/technical-references/vip-dashboard/backups/) to download the database data from the production environment.

- Run `npm run vip -- export sql --output=local/public/wp/vip-export.sql` to download the latest available backup to your local computer.
- Run `npm run cli -- wp db export` to export and backup the database of your local development environment, which will place a file like `wordpress-2020-03-04-448b132.sql` in the `local/public/wp` directory.
- Run `npm run cli -- wp db import vip-export.sql` to import `local/public/wp/vip-export.sql` into your local development environment.
- Run `npm run cli -- bash -c "pv import.sql | wp db query"` to import a large database file `local/public/wp/vip-export.sql` while monitoring the progress with [`pv`](https://linux.die.net/man/1/pv) which is bundled with the WordPress container. The `bash -c` prefix allows us to run multiple commands inside the container without affecting the main `npm run cli` command.

Scripts 🧰
---------

[](#scripts-)

We use `npm` as the canonical task runner for things like linting files and creating release bundles. Composer scripts (defined in `composer.json`) are used only for PHP related tasks and they have a wrapper npm script in `package.json` for consistency with the rest of the registered tasks.

- `npm run start` and `npm run stop` to start and stop the local development environment. Run `npm run start-debug` to start the environment in debug mode, where all output from containers is displayed. Run `npm run stop-all` to stop all active Docker containers in case you're running into port conflicts. Run `npm run stop -- --volumes` to stop the project containers and delete the database data volume.
- `npm run lint` to check source code against the defined coding standards.
- `npm run cli -- wp help` where `wp help` is any command to run inside the WordPress docker container. For example, run `npm run cli -- wp plugin list` to list all of the available plugins or `npm run cli -- composer update` to update the Composer dependencies using the PHP binary in the container instead of your host machine. Run `npm run cli -- wp user create devgo local@devgo.vip --role=administrator --user_pass=devgo` to create a new administrator user with `devgo` as username and password.
- `npm run vip` to run [VIP CLI](https://wpvip.com/documentation/vip-go/vip-cli/) commands on staging and production environments.
- `npm run install-cert` to mark the self-signed SSL certificate authority (under [`local/certs/rootCA.pem`](local/certs/rootCA.pem)) for the local development environment as trusted. Make sure [`mkcert` is installed on your computer](#install-dependencies). This command is required to avoid the "Your connection is not private" error when visiting the site. Stop the local environment before running this command, restart the browser/tab after installing the certificate, and start the environment again.

Release Process &amp; Deployments 🚀
-----------------------------------

[](#release-process--deployments-)

This project follows a structured release process with automated deployments managed by GitHub Actions workflows.

### Branch Strategy

[](#branch-strategy)

BranchPurposeEnvironmentAuto-Deploy`develop`Development workDev✅`main`Staging/testingTest✅`release`UAT testingPre-prod✅`production`Live siteProduction✅### Release Workflow

[](#release-workflow)

1. **Development**: Developers can use `develop` for testing, but create PRs to `main` for code review
2. **Testing**: Approved features merged into `main` → Auto-deploys to test environment
3. **Release Creation**: EM/TL creates `release` branch from `main` for UAT → Auto-deploys to pre-prod
4. **Production**: After UAT approval, `release` is merged → `production` → Auto-deploys to production

### Automated Workflows

[](#automated-workflows)

Our deployment process uses several automated GitHub Actions workflows:

- **[Test &amp; Deploy](.github/workflows/test-deploy.yml)**: Runs on all PR/push events - handles linting, testing, and environment-specific deployments
    - **Note**: Tests are skipped for production deployments since code has already been tested in pre-production
- **[Create Release Branch](.github/workflows/create-release-branch.yml)**: Manual workflow for EM/TL to create release branches from main
- **[Create Production PR](.github/workflows/create-production-pr.yml)**: Manual workflow to create production release PRs with comprehensive checklists
- **[Release Cleanup](.github/workflows/cleanup-release-branch.yml)**: Automatic cleanup after production deployments
- **[Docker Images](.github/workflows/docker-images.yml)**: Builds and publishes Docker images when needed

📋 **Detailed workflow documentation**: [GitHub Actions Workflows](.github/workflows/README.md)

### Environment Configuration

[](#environment-configuration)

The workflows require specific GitHub secrets and variables to be configured in your repository settings.

📋 **Complete configuration details**: [Workflow Configuration](.github/workflows/README.md#configuration)

### Technical Details

[](#technical-details)

The deployment process:

1. Runs `local/scripts/deploy.sh` which creates a clean build environment
2. Checks code against [VIP coding standards](https://github.com/Automattic/VIP-Coding-Standards)
3. Builds release artifacts and filters files using `.distinclude`
4. Commits changes to the matching VIP branch for server import

#### NewRelic Integration

[](#newrelic-integration)

Automatic deployment markers are sent to NewRelic (when `NEW_RELIC_API_KEY` is configured):

```
npm run newrelic-mark-deploy -- --search "*-production" --api_key "$NEW_RELIC_API_KEY" --commit "$COMMIT_SHA" --user "$DEPLOY_USER" --description "$COMMIT_MESSAGE"

```

The `--search` parameter finds NewRelic apps using the pattern `*-{environment}` where environment matches the VIP environment name.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance53

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?d=identicon)[kasparsd](/maintainers/kasparsd)

![](https://www.gravatar.com/avatar/415bc53586018077324af64dad074bf430ba1b72471550489372668274a13b12?d=identicon)[xwp](/maintainers/xwp)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (75 commits)")[![nandotess](https://avatars.githubusercontent.com/u/804109?v=4)](https://github.com/nandotess "nandotess (70 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (58 commits)")[![kasparsd](https://avatars.githubusercontent.com/u/169055?v=4)](https://github.com/kasparsd "kasparsd (47 commits)")[![PatelUtkarsh](https://avatars.githubusercontent.com/u/5015489?v=4)](https://github.com/PatelUtkarsh "PatelUtkarsh (7 commits)")[![Nikschavan](https://avatars.githubusercontent.com/u/2931091?v=4)](https://github.com/Nikschavan "Nikschavan (7 commits)")[![tharsheblows](https://avatars.githubusercontent.com/u/1530368?v=4)](https://github.com/tharsheblows "tharsheblows (2 commits)")[![m-muhsin](https://avatars.githubusercontent.com/u/11702935?v=4)](https://github.com/m-muhsin "m-muhsin (2 commits)")[![kopepasah](https://avatars.githubusercontent.com/u/911283?v=4)](https://github.com/kopepasah "kopepasah (2 commits)")[![delawski](https://avatars.githubusercontent.com/u/478735?v=4)](https://github.com/delawski "delawski (2 commits)")[![zzap](https://avatars.githubusercontent.com/u/1508963?v=4)](https://github.com/zzap "zzap (1 commits)")[![dipskakadiya](https://avatars.githubusercontent.com/u/2979084?v=4)](https://github.com/dipskakadiya "dipskakadiya (1 commits)")[![edmundcwm](https://avatars.githubusercontent.com/u/13222067?v=4)](https://github.com/edmundcwm "edmundcwm (1 commits)")[![mehigh](https://avatars.githubusercontent.com/u/367593?v=4)](https://github.com/mehigh "mehigh (1 commits)")[![piotr-bajer](https://avatars.githubusercontent.com/u/12783610?v=4)](https://github.com/piotr-bajer "piotr-bajer (1 commits)")[![ramsesdelr](https://avatars.githubusercontent.com/u/6528824?v=4)](https://github.com/ramsesdelr "ramsesdelr (1 commits)")[![say2me](https://avatars.githubusercontent.com/u/270353?v=4)](https://github.com/say2me "say2me (1 commits)")[![akshitsethi](https://avatars.githubusercontent.com/u/266324?v=4)](https://github.com/akshitsethi "akshitsethi (1 commits)")

---

Tags

github-templatevip-gowordpresswordpress-boilerplatewordpress-sitewordpress-vipxwp-inits

### Embed Badge

![Health badge](/badges/xwp-vip-go-site/health.svg)

```
[![Health](https://phpackages.com/badges/xwp-vip-go-site/health.svg)](https://phpackages.com/packages/xwp-vip-go-site)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
