GithubHelp home page GithubHelp logo

carl-alberto / advanced-wordpress-on-pantheon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ataylorme/advanced-wordpress-on-pantheon

1.0 3.0 0.0 1.79 MB

License: MIT License

Shell 56.57% JavaScript 16.75% PHP 21.87% Gherkin 3.25% CSS 1.56%

advanced-wordpress-on-pantheon's Introduction

    .+?:
     .+??.
       ??? .
       +???.
  +?????????=.
  .???????????.
  .????????????.

 ########### ########
 ############.#######.
 ####### ####  .......
 ######## #### #######
 #########.####.######
 ######  ...
 #######.??.##########
 #######~+??.#########
 ########.??..
 #########.??.#######.
 #########.+?? ######.
           .+?.
     .????????????.
       +??????????,
        .????++++++.
          ????.
          .???,
           .~??.
             .??
              .?,.

Advanced WordPress on Pantheon

Purpose

This repository is an extension of pantheon-systems/example-wordpress-composer showning an example of an advanced WordPress deployment workflow on Pantheon integrating tools such as:

Deprecated Branch

The old version of this example used CircleCI 1.0 and did a lot of steps that the Terminus build tools plugin now does manually. This has been deprecated in favor of an example based on CircleCI 2.0 and Example WordPress Composer. The circle-ci-1 branch has this version archived for reference only.

CircleCI Setup

You will need to add the following environment variables in the CircleCI UI. See https://circleci.com/docs/2.0/environment-variables/ for details.

  • TERMINUS_SITE: Name of the Pantheon site to run tests on, e.g. my_site
  • TERMINUS_TOKEN: The Pantheon machine token
  • GITHUB_TOKEN: The GitHub personal access token
  • GIT_EMAIL: The email address to use when making commits
  • TEST_SITE_NAME: The name of the test site to provide when installing.
  • ADMIN_PASSWORD: The admin password to use when installing.
  • ADMIN_EMAIL: The email address to give the admin when installing.

Local Setup

In order to develop the site locally a few steps need to be completed. These steps only need to be performed once, unless noted.

  • Open a terminal
  • Checkout the Git repository
  • Enter the Git docroot

Local Development

Using Lando as a local development environment

First, take care of the one-time setup steps below:

  • Install Lando if not already installed
  • Edit .lando.yml and update name, site and id to match those of your Pantheon site
    • You will also need to edit the node proxy if you wish to access BrowserSync at a different URL

Then, use lando start and lando stop to start and stop the local development environment.

After cloning this repository you will need to download dependencies. This can be done through Lando with the commands below:

  • lando composer-install
  • lando gulp-build

Tests can also be run locally on Lando with the commands below:

  • lando composer local-behat
  • lando composer unit-test

Using another local development environment

All of these steps are a one-time step unless noted.

  • Install Composer if not already installed
  • Install NodeJS and NPM if not already installed
  • Copy sample.env to .env and update the values accordingly
  • Run ./bin/install-composer-dependencies.sh to install PHP dependencies with Composer
    • composer update will need to be ran if composer.json has been changed
  • Run ./.circleci/build-gulp-assets.sh to compile theme assets

Updates and file changes

** Note: ** if you are using Lando for local development prefix all of the commands below with lando to run them on Lando instead of your local system. For example, npm run dev would become lando npm run dev.

  • composer update will need to be ran after any changes to composer.json
    • Any non-custom PHP code, including to WordPress core, new plugins, etc., should be managed with Composer and updated in this way.
  • npm run gulp will need to be ran in web/wp-content/themes/twentyseventeen-child after any changes to web/wp-content/themes/twentyseventeen-child/source files
    • npm run watch can be used to build the production CSS and JavaScript files, watch for changes in the source files, and rebuild the production files after a change.
    • npm run dev is the same as above but it also starts a BrowserSync instance for automated reloading. Be sure to update the url export in web/wp-content/themes/twentyseventeen-child/gulp/constants.js with your local development URL. Unless you are using Lando, in which case leave it set to https://nginx/.
  • npm install will need to be ran after any changes to web/wp-content/themes/twentyseventeen-child/package.json
    • This is for advanced users who wish to customize their frontend build process.

advanced-wordpress-on-pantheon's People

Contributors

ataylorme avatar dependencies-bot avatar dependencies[bot] avatar greg-1-anderson avatar stevector avatar tobeycodes avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.