Edit this page on Github

In this guide you will learn how Spress works and how easy is to publish a site.


  • GNU/Linux, Unix, or macOS.
  • PHP 5.6 or greater.


The best way to get Spress is to download the PHAR file:

$ curl -LOS https://github.com/spress/Spress/releases/download/v3.0.0/spress.phar
$ chmod +x spress.phar

if you want use the executable globally, move it to /usr/local/bin/:

$ sudo mv spress.phar /usr/local/bin/spress

On Windows

Globally installing of Spress involves a few steps:

  1. Create a directory for PHP binaries; e.g., C:\bin.
  2. Append ;C:\bin to your PATH environment variable.
  3. Download https://github.com/spress/Spress/releases/download/v3.0.0/spress.phar and save the file as C:\bin\spress.phar.
  4. Open a command line (e.g., press Windows+R → type cmdENTER).
  5. Create a wrapping batch script (results in C:\bin\spress.cmd):
C:\Users\username> cd C:\bin
C:\bin> echo @php "%%~dp0spress.phar" %%* > spress.cmd
C:\bin> exit
  1. Open a new command line and confirm that you can execute spress from any path:
C:\Users\username> spress --version
Spress - The static site generator version x.y.z

For Cygwin and/or MingW32 (e.g., TortoiseGit) shell environments, you may skip step 5. above, simply save the file as spress (without .phar extension), and make it executable via chmod 775 spress.

Quick start

Lets create a sample site and build it. With Spress executable, you have two options:

  1. To scaffold a blank site.
  2. To use a base theme.

Lets create our site using Spresso theme:

Spresso is the theme base of Spress. See the Add-ons page for more themes and plugins.

$ spress new:site /your-site-dir spress/spress-theme-spresso
$ cd /your-site-dir
$ spress site:build --server --watch

# Browse to localhost:4000

With new:site command Spress creates a new site using Spresso theme. Next, you can build your site with site:build command. You'll get the result at build folder.

The --server option launches a built-in server which lets you see your site at http://localhost:4000. --watch option tells Spress to watch your files for changes.