asmbs / thunderpress
Slim WordPress stack inspired by Bedrock
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=5.4
- asmbs/wp-ip: ^1.0
- asmbs/wp-unblog: ^1.1
- composer/installers: ^1.0
- friartuck6000/wp-parsedown: ^1.0
- johnpbloch/wordpress: ^4.4
- vlucas/phpdotenv: ^2.2
- wpackagist-plugin/members: ^1.1
- wpackagist-plugin/wordpress-https: ^3.3
- wpackagist-plugin/wp-mail-smtp: ^0.9
Requires (Dev)
- composer/composer: ^1.0@beta
README
A slim WordPress stack inspired heavily by Bedrock.
Features
- 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
Requirements
- PHP 5.5 or later
- Composer
Installation
- 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
.
Environment Variables
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'
Deploying
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>
Other Stuff
Google Analytics
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.