CalderaWP/cf-pantheon-upstream

Name: cf-pantheon-upstream

Owner: Caldera Labs

Description: Custom upstream for Caldera Forms testing on Pantheon

Created: 2017-10-28 18:48:32.0

Updated: 2017-10-28 19:12:17.0

Pushed: 2017-10-30 23:58:28.0

Homepage: null

Size: 15306

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Example WordPress Composer

CircleCI

This repository is a start state for a Composer-based WordPress workflow with Pantheon. It is meant to be copied by the the Terminus Build Tools Plugin which will set up for you a brand new

For more background information on this style of workflow, see the Pantheon documentation.

Installation
Prerequisites

Before running the terminus build:project:create command, make sure you have all of the prerequisites:

You may find it easier to export the GitHub and CircleCI tokens as variables on your command line where the Build Tools Plugin can detect them automatically:

rt GITHUB_TOKEN=[REDACTED]
rt CIRCLE_TOKEN=[REDACTED]
One command setup:

Once you have all of the prerequisites in place, you can create your copy of this repo with one command:

inus build:project:create pantheon-systems/example-wordpress-composer my-new-site --team="Agency Org Name" --stability=dev

The parameters shown here are:

PHP Version

You will need PHP 7.0 or higher locally to run the build:project:create command as some of the dependencies in this project require it. Both composer.json and pantheon.yml are currently set to use PHP 7.0.

Important files and directories
/web

Pantheon will serve the site from the /web subdirectory due to the configuration in pantheon.yml, facilitating a Composer based workflow. Having your website in this subdirectory also allows for tests, scripts, and other files related to your project to be stored in your repo without polluting your web document root.

/web/wp

Even within the /web directory you may notice that other directories and files are in different places compared to a default WordPress installation. See /web/wp-config.php for key settings like WP_SITEURL which allows WordPress core to be relocated to /web/wp. The overall layout of directories in the repo is inspired by Bedrock.

composer.json

If you are just browsing this repository on GitHub, you may not see some of the directories mentioned above like wp-admin. That is because WordPress core and its plugins are installed via Composer and ignored in the .gitignore file. Specific plugins are added to the project via composer.json and composer.lock keeps track of the exact version of each plugin (or other dependency). Generic Composer dependencies (not WordPress plugins or themes) are downloaded to the /vendor folder.

Behat tests

So that CircleCI will have some test to run, this repository includes a configuration of WordHat, A WordPress Behat extension. You can add your own .feature files within /tests/behat/features. A fuller guide on WordPress testing with Behat is forthcoming.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.