Welcome to WordPress VIP! This repository is a starting point for building your WordPress VIP application, including all the base directories.
Environment | Branch | URL |
---|---|---|
Production | main | https://example.com |
Staging | staging | https://staging.example.com |
Development | develop | https://dev.example.com |
Name | Github Username |
---|---|
Name | @github_username |
Name | Github Username |
---|---|
Name | @github_username |
- Complete the features or bug fixes locally and push the branch to the GitHub repo.
- Raise a pull request (PR) against the develop branch.
- Assign that PR to Developer/EM for internal code review. If any code review feedback, the team needs to address it and push changes, update PR, and re-request code review.
- PR approved: Merge that into the develop branch and it will deploy to the development site. You can review the feature there.
- Perform internal QA on the development site.
- Follow the same steps to deploy the changes on QA (preprod) site. Code review is not required.
- Client will do the UAT on the QA site and they will approve.
- Once approved, you can raise the PR against the master branch and assign a PR to Developer/EM/VIP team for the final code review.
- PR approved: you can merge and it will deploy to the production site.
master
- For feature -
feature/issue-name
For example,feature/add-plugin
- For bug -
fix/issue-name
For example,fix/phpcs-errors
- Title should be same as Issue title. Also add issue number before title. For example,
#3 Setup initial theme
. - Add proper description.
- Assign code reviewer and project.
- Create draft pull request for work in-progress PR and don't add
WIP:
in PR title. - PR should have one approval.
We recommend starting with one of the following WordPress VIP guidebooks:
- Local development for a WordPress VIP application
- Development workflow for WordPress VIP
- Launching a site with WordPress VIP
All the following directories are required and must not be removed:
client-mu-plugins/
: For always active global plugins (similar tomu-plugins
).docs/
: Not mounted to production, so useful for storing documentation about an applications features and requirements.images/
: Store your site's favicons here. All other public-facing images should be uploaded or imported to the WordPress dashboard or stored as part of your/theme/
assets.languages/
: For.po
and.mo
translation files, which specify the translated strings for the site.plugins/
: Your site's regular plugins.private/
: Provides access to files that are not directly web accessible, but can be accessed by your theme or plugin code.themes/
: Themes available to your sites. We recommend keeping the default theme available for testing purposes.vip-config/
: For custom configurations and additionalsunrise.php
changes. This folder’svip-config.php
can be used to supply things usually found inwp-config.php
..
These directories will also be available on production web servers. Any additional directories created in your GitHub repository that are not included in the above list will not be mounted onto your site, and so will not be web-accessible.
For more information on how our codebase is structured, see https://docs.wpvip.com/technical-references/vip-codebase/.
The docs/
directory is a special directory that contains your documentation for your application. It is not mounted onto your site, but is available for you to use. See docs/index.php for more information.
This repo contains a starting point for installing and using a local version of PHP_CodeSniffer (PHPCS). To get started, you'll need to have Composer installed, then open a command line at this directory, and run:
composer install
This will install PHPCS and register the below standards:
The .phpcs.xml.dist
file contains a suggested configuration, but you are free to amend this. You can also extend it for more granularity of configuration for theme and custom plugins.
To run PHPCS, navigate to the directory where the relevant .phpcs.xml.dist
lives, and type:
vendor/bin/phpcs
See the PHPCS documentation (or run phpcs -h
) for the available command line arguments.
If you need help with anything, VIP's support team is just a ticket away.
Feel free to add to or replace this README.md content with content unique to your project, for example:
- Project-specific notes; like a list of VIP environments and branches,
- Workflow documentation; so everyone working in this repo can follow a defined process, or
- Instructions for testing new features.
This can be detailed in the docs/
directory.