Creating Latest Blueprint

Creating “The Latest” Blueprint

Did you know that you can create a blueprint that will pull the latest version of WordPress as well as any of the themes or plugins that are in the repository. You can even install premium plugins and themes as long as you have them in a location set to where you can access them (i.e. DropBox). Why would you want to do that? Well it saves time when you create the local development installation and then have to run the updates on core, themes and plugins.  Simple, really.  How do you do it you ask? Here are the steps:

  • Create a new folder on your desktop. Call it “LatestGreatest-BluePrint” (or something that works for you!)
  • Using a text editor (Sublime text is my favorite) You’ll need to create two files:
    • blueprint.php & wp-config-sample-php.

In the blueprint.php is where you will add the code that pulls in the latest WordPress version plus plugin-ins. I’ve included a screenshot so you can see the syntax that you’ll need.

blueprint-latestv2

Also here is some starter code that you can use via copy/paste – remember to replace the directory structure and file names to suit your needs:

<?php
/**
* Automate the setup of the freshest version of WordPress, Adam’s favorite theme and plugins
*/

/** Download, unzip WordPress, and move the contents into root. */
ds_cli_exec( “wget https://wordpress.org/latest.zip && unzip latest.zip && mv ./wordpress/* ./” );

/** Copy Beaver Builder – set the path to where you have your Beaver Builder stored on your system */
ds_cli_exec( “cp /Users/billybob/Dropbox/Themes/bb-plugin-agency.zip ./wp-content/plugins/ && unzip ./wp-content/plugins/bb-plugin-agency.zip && mv ./bb-plugin/ ./wp-content/plugins/” );

/** Copy Gravity Forms – set the path to where you have your Gravity Forms stored on your system */
ds_cli_exec( “cp /Users/billybob/Dropbox/Themes/gravityforms*.zip ./wp-content/plugins/ && unzip ./wp-content/plugins/gravityformsy*.zip && mv ./gravityforms/ ./wp-content/plugins/” );

/** Download, unzip Coming Soon Edit, and move the plugin into the plugin folder. */
ds_cli_exec( “wget http://downloads.wordpress.org/plugin/coming-soon.latest-stable.zip && unzip coming-soon*.zip && mv ./coming-soon/ ./wp-content/plugins/” );

/** Check if index.php unpacked okay */
if ( is_file( “index.php” ) ) {

/** Cleanup the empty folder, download, and this script. */
ds_cli_exec( “rm -rf wordpress && rm index.htm && rm latest.zip && rm blueprint.php” );

ds_cli_exec( “rm -rf rm ./wp-content/pluginscoming-soon*.zip” );
ds_cli_exec( “rm -rf rm ./wp-content/plugins/gravityforms*.zip” );
ds_cli_exec( “rm -rf rm ./wp-content/plugins/bb-plugin-agency.zip” );
ds_cli_exec( “rm -rf rm coming-soon*.zip” );
}

As for the wp-config-sample.php file, it is the default config file that is copied to wp-config.php and then modified with database credentials and can be found in any WP install.

Once you have created those two files, you can simply ZIP up the folder and place it in Applications/Xampp/blueprints (for Mac) or c:\xampplite\blueprints (for Windows).

You will now be able to select it as a blueprint like any other blueprints you’ve created.

As with many things in the WordPress setups, there are pros and cons to this method. The pro being you can pull in the latest of all the plugins and themes that you want.  The con is the fact that you won’t be able to have the license keys, settings and configurations pre-done as there is no database created prior.

 

Leave a Reply

Your email address will not be published. Required fields are marked *