Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

GSA/datagov-wp-boilerplate

 
 

Repository files navigation

CircleCI

[Datagov-wp-boilerplate]

WordPress boilerplate based on Bedrock

Bedrock is a modern WordPress stack that helps you get started with the best development tools and project structure.

Much of the philosophy behind Bedrock is inspired by the Twelve-Factor App methodology including the WordPress specific version.

Updating WP and plugin versions

Updating your WordPress version (or any plugin) is just a matter of changing the version number in the composer.json file.

Then running composer update will pull down the new version.

Community

Most of Data.gov discussions happen at Data.gov github

Development

Prerequisites

Setup

Build the docker containers.

$ make build

Run the docker containers.

$ make up

Activate all the installed plugins and theme.

$ make setup

The admin password is in the output of the above command.

Open your browser to localhost:8000.

TODO: initialize the database with seed data so the theme loads properly.

Clean local directories and containers.

$ make clean

Update dependencies

Build the containers and run composer update within the container.

$ make update

Restoring database dumps

You don't need a database dump for most development tasks. If you need a database dump, you can create one following instructions from the Runbook.

Once you have the database dump, you can restore it for your local development environment.

$ docker-compose exec -T db mysql -u root -pmysql-dev-password datagov \
  < <(gzip --to-stdout --decompress databasedump.sql.gz)

Admin dashboard

In order to access the admin dashboard for development, you must first disable saml and update the admin password.

First, deactivate the saml plugin.

$ docker-compose exec app wp --allow-root plugin deactivate saml-20-single-sign-on

Reset the admin password to password.

$ docker-compose run --rm app wp --allow-root user update admin --user_pass=password

Open the login page localhost:8000/wp/wp-login.php. Login with the user admin password password.

Packages

 
 
 

Languages

  • PHP 70.0%
  • Shell 20.1%
  • Dockerfile 5.4%
  • Makefile 4.5%