Skip to content
endorama edited this page May 8, 2012 · 3 revisions

Wordless deploy

Wordless is still in his alpha state, so it's working but not complete and subject to changes. Deploy a Wordless theme to your production site can be a little cucumbersome, mainly because the process is not (up to now, see issue #59) automated.

Deploy using Wordless gem

Since the creation of the wordless gem, you can compile assets using the compile command from the gem.

This wiki page is useful only if you have an old Wordless version which does not have compile_assets() function ( introduced in commit a676f2 on 20 March 2012 ).

Requirements

You need to have curl installed to follow this guide.

How to deploy it

Ok. You have done working on your theme and all is ready for production. But how can the theme be deployed? Follow these simple steps and you're ready to rock!

  1. Get the compiled assets.
    Assets are compiled on request in development environment. To get all the definitive assets in the right folders execute this code from the root of your Wordless theme:

     cd assets/javascripts
     curl -O http://{your-local-wp-installation}/wp-content/themes/{theme-name}/assets/javascripts/application.js
     cd ../stylesheets
     curl -O http://{your-local-wp-installation}/wp-content/themes/{theme-name}/assets/assets/stylesheets/print.css
     curl -O http://{your-local-wp-installation}/wp-content/themes/{theme-name}/assets/assets/stylesheets/screen.css
    

    Replace {your-local-wp-installation} with the URL of you local WordPress installation.
    Replace {theme-name} with the Wordless theme folder name.

    You can repeat the curl command for every assets (js/css) you have created. The commands above are for the default wordless files ( the ones you find when creating a wordless theme ). If you have created other assets, copy the above command changing the path.

  2. Upload your theme.
    All assets are in the correct folder, now you can deploy your theme simply uploading the folder to the production installation ( exactly like any other WordPress theme ).

  3. Remove the compiled assets.
    To get on request compiling of your assets you need to remove them from your development installation. Use this:

     rm assets/javascripts/application.js
     rm assets/stylesheets/print.css
     rm assets/stylesheets/screen.css