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¶
- Install WP-CLI http://wp-cli.org/#installing
- Install global packages from NPM:
npm install -g foreman yarn
[1] [2] (you already have node on your development machine, haven’t you?) - WordPress installed and configured as per official documentation
- 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.
See also
Steps¶
Note
We consider that you have WordPress already up and running and you are in the project’s root directory in your terminal.
Install and activate the wordpress plugin
wp plugin install --activate wordless
Scaffold a new theme
wp wordless theme create mybrandnewtheme
Enter theme directory
cd wp-content/themes/mybrandnewtheme
Bundle NPM packages
yarn install
Start the server - and the magic
yarn run server
Webpack, php server and your browser will automatically come up and serve your needs :)
See also
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 |