Forces generation of Blade template cache files for Sage9.
Branch: master
Clone or download
Latest commit 39d1a7d Dec 12, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin added all initial files Feb 28, 2017
features added all initial files Feb 28, 2017
utils added all initial files Feb 28, 2017
.distignore added all initial files Feb 28, 2017
.gitignore added all initial files Feb 28, 2017
.travis.yml Change Travis build variables May 22, 2017 Update README Dec 12, 2017
command.php Cleanup Dec 12, 2017
composer.json Paths no longer important: Plugin renders all blade files it can find May 22, 2017
composer.lock Paths no longer important: Plugin renders all blade files it can find May 22, 2017
phpcs.xml Ignore some things specific to WP-CLI. Dec 12, 2017
wp-cli.yml added all initial files Feb 28, 2017


Build Status

Quick links: Using | Installing | Contributing





The primary function of this plugin is to compile Blades on demand.

wp blade compile

This will iterate through all .blade.php files in your theme directory and generate compiled versions.

If you only want to compile some of your templates, you can specify a directory using the directory parameter:

wp blade compile --directory=path/to/files

The directory is relative to your theme root.


Sometimes you want to clear out your Blade cache! This plugin can help you do that too.


wp blade clear

This will look at all your Blades and remove their cached versions. It will only remove cached files for existing Blades; it will not clear out everything in your Blade cache directory.

It takes the same --directory argument as compile, and will only remove cached files for those Blades in the passed directory. For instance, if you pass:

wp blade clear --directory=path/to/files

Then only the cached versions of files in path/to/files will be deleted.

If you want to clear out your entire cache (i.e. you have removed a Blade template), then use wipe.


wp blade wipe

This function takes no arguments, and simply removes every file it finds in your Blade cache. It determines where the cache is by calling Sage's App\config('view.compiled');


Installing this package requires WP-CLI v1.1.0 or greater. Update to the latest stable release with wp cli update.

Currently WP-CLI is not accepting new package submissions, but you can install this package directly from github with the following command: wp package install


We appreciate you taking the initiative to contribute to this project.

Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.

Reporting a bug

Think you’ve found a bug? We’d love for you to help us get it fixed.

Before you create a new issue, you should search existing issues to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.

Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please create a new issue with the following:

  1. What you were doing (e.g. "When I run wp post list").
  2. What you saw (e.g. "I see a fatal about a class being undefined.").
  3. What you expected to see (e.g. "I expected to see the list of posts.")

Include as much detail as you can, and clear steps to reproduce if possible.

Creating a pull request

Want to contribute a new feature? Please first open a new issue to discuss whether the feature is a good fit for the project.

Once you've decided to commit the time to seeing your pull request through, please follow our guidelines for creating a pull request to make sure it's a pleasant experience:

  1. Create a feature branch for each contribution.
  2. Submit your pull request early for feedback.
  3. Include functional tests with your changes. Read the WP-CLI documentation for an introduction.
  4. Follow the WordPress Coding Standards.