A slim WordPress stack inspired heavily by Bedrock.
- Uses Mina for deploy management.
- Includes the wp-parsedown plugin to convert WordPress to a Markdown-only CMS.
- Adds several other common and useful plugins out of the box.
- Uses PHP dotenv for more secure site config
- Uses environment-specific config files
- PHP 5.5 or later
- Composer
- Clone this repo, or download a release.
- Run
composer install
. - Copy
.env.example
to.env
and modify your config parameters (see below). - Add any bespoke plugins/themes (be sure to update your
.gitignore
so they'll be tracked). - Set your host's document root to
/path/to/vhost/web
(or/path/to/vhost/current/web
if you're using Mina for deploys). - Go!
Your site's WP Admin will be available at http://example.com/wp/wp-admin
.
Note: Never track your .env
file in git!
Site Environment
; Default values shown
WP_ENV = 'development'
WP_HOME = 'http://example.com'
WP_SITEURL = 'http://example.com/wp'
Database
; Default values shown
DB_NAME = 'database_name'
DB_USER = 'database_user
DB_PASSWORD = 'database_password'
DB_HOST = 'localhost'
DB_PREFIX = 'wp_'
Keys/Salts
You can generate these automatically with composer run-script salts
.
AUTH_KEY = ''
SECURE_AUTH_KEY = ''
LOGGED_IN_KEY = ''
NONCE_KEY = ''
AUTH_SALT = ''
SECURE_AUTH_SALT = ''
LOGGED_IN_SALT = ''
NONCE_SALT = ''
Optional Settings
; Use another WordPress site in your data to manage users
WP_USER_TABLE = ''
WP_USER_META_TABLE = ''
; Adjust PHP settings
WP_MEMORY_LIMIT = '128M'
; Analytics tracking (see below)
GA_PROPERTY_ID = 'your_property_id'
Make sure mina is installed before continuing:
gem install mina
-
Edit
config/deploy.rb
to set up global parameters. -
To configure a target, copy the example
environment.rb.example
file to<target>.rb
, where<target>
is the name of the environment you want to deploy to. You can have as many target environments as you want. -
Set up the deploy directory on the server:
mina setup server=<target>
-
You can deploy to an environment using any branch, commit or tag:
# Uses master branch by default mina deploy server=<target> # Specify a branch mina deploy server=<target> branch=<branch-name> # Specify a commit mina deploy server=<target> commit=<commit-sha> # Specify a tag mina deploy server=<target> tag=<tag-name>
Thunderpress includes a built-in plugin (not must-use, you have to activate it) that will automatically add your Google Analytics tracking script. To use it:
- Activate the plugin
- Set the
GA_PROPERTY_ID
environment variable in.env
- That's it—the script will be added to your pages automatically.
Note: The tracking script will not be added if you're logged in with admin/editing capabilities.