Installation

Wordless GEM (favourite)

The quickest CLI tool to setup a new WordPress locally. Wordless ready.

No prerequisites. Just joy.

Navigate to https://github.com/welaika/wordless_gem to discover the tool and set up all you need for local development. In less than 2 minutes ;)

(Not so) Manual

At the end of the installation process you will have

  • a plugin - almost invisible: no backend page, just wp-cli commands
  • a theme - where we will do all of the work

Prerequisites

  1. Install WP-CLI http://wp-cli.org/#installing
  2. Install global packages from NPM: npm install -g foreman yarn [1] [2] (you already have node on your development machine, haven’t you?)
  3. WordPress installed and configured as per official documentation
  4. Install MailHog. On MacOS this is as simple as brew install mailhog. Wordless will do the rest.

Note

We don’t know if you have a local apache {M,L,W}AMPP instance or whatever in order to perform the official installation process. Keep in mind that Wordless’s flow does not need any external web server, since it will use the wp server command to serve your wordpress.

Steps

Note

We consider that you have WordPress already up and running and you are in the project’s root directory in your terminal.

  1. Install and activate the wordpress plugin

    wp plugin install --activate wordless
    
  2. Scaffold a new theme

    wp wordless theme create mybrandnewtheme
    
  3. Enter theme directory

    cd wp-content/themes/mybrandnewtheme
    
  4. Bundle NPM packages

    yarn install
    
  5. Start the server - and the magic

    yarn run server
    

Webpack, php server and your browser will automatically come up and serve your needs :)

Note

It is possible that your OS asks you to allow connections on server ports (3000 and/or 8080). It’s just ok to do it.

[1]https://www.npmjs.com/package/yarn
[2]https://www.npmjs.com/package/foreman