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 to setup 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 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 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 or whatever in order to do the official installation process. Keep in mind that Wordless flow do not need any external web server, since it will use wp server command to serve your wordpress.

Steps

Note

We consider that you have WordPress already up and running and you are in project’s root within 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 in theme’s directory

    cd wp-content/themes/mybrandnewtheme
    
  4. Bundle NPM’s 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’s possible that your OS will ask you to allow connections on server’s 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