WordPress project starter kit, based on the excellent Bedrock boilerplate and Sage theme
🚨 Currently in real battle testing...
- Better Wordpress folder structure
- Manage Wordpress plugins and dependency via Composer
- Easy WordPress configuration with environment specific files
- Environment variables with Dotenv
- Autoloader for mu-plugins (use regular plugins as mu-plugins)
- Sass and ES6 Javascript for front-end development with HMR enabled
- Webpack for compiling assets
- Laravel's Blade as a templating engine
-
Create a new project in a new folder for your project:
composer create-project "gladeye/blueprint:1.0.0-beta.1" your-project-folder-name
-
Update environment variables in
.env
file:DB_NAME
- Database nameDB_USER
- Database userDB_PASSWORD
- Database passwordDB_HOST
- Database hostWP_ENV
- Set to environment (development
,staging
,production
)WP_HOME
- Full URL to WordPress home (http://example.com)WP_SITEURL
- Full URL to WordPress including subdirectory (http://example.com/wp)AUTH_KEY
,SECURE_AUTH_KEY
,LOGGED_IN_KEY
,NONCE_KEY
,AUTH_SALT
,SECURE_AUTH_SALT
,LOGGED_IN_SALT
,NONCE_SALT
If you want to automatically generate the security keys (assuming you have wp-cli installed locally) you can use the very handy wp-cli-dotenv-command:
wp package install aaemnnosttv/wp-cli-dotenv-command wp dotenv salts regenerate
Or, you can cut and paste from the Roots WordPress Salt Generator.
-
Run
yarn start
and build something awesome!
public/content/themes/sage/ # → Root of your Sage based theme
├── app # → Theme PHP
│ ├── admin.php # → Theme customizer setup
│ ├── filters.php # → Theme filters
│ ├── helpers.php # → Helper functions
│ ├── post-types.php # → Custom Post types register list
│ ├── setup.php # → Theme setup
│ ├── taxonomies.php # → Custom Taxonomies register list
│ ├── post-types/ # → Custom Post Types definitions
│ └── taxonomies/ # → Custom Taxonomies definitions
└── resources # → Theme assets and templates
├── assets # → Front-end assets
│ ├── options.json # → Settings for compiled assets
│ ├── dist/ # → Built theme assets (never edit)
│ ├── fonts/ # → Theme fonts
│ ├── images/ # → Theme images
│ ├── media/ # → Theme others media (e.g svg, video)
│ ├── scripts/ # → Theme scripts
│ └── styles/ # → Theme styles
├── functions.php # → Theme bootstrap
├── index.php # → Never manually edit
├── screenshot.png # → Theme screenshot for WP admin
├── style.css # → Theme meta information
└── views # → Theme templates
├── layouts/ # → Base layouts
└── partials/ # → Partial templates
Edit app/setup.php
to enable or disable theme features, setup navigation menus, post thumbnail sizes, and sidebars.
MIT © Gladeye