- Check that you have all prerequisites (Git, Node, NPM). See below for more details.
- Clone this repository locally.
- Add
127.0.0.1 calypso.localhostto your local hosts file. - Execute
make runfrom the directory of the repository. - Open
calypso.localhost:3000in your browser.
To be able to clone the repo and run the application you need:
- Node.js and NPM installed. Here's a handy installer for Windows, Mac, and Linux. On Mac OSX using brew is the easiest way to install
nodeandnpm. - Git. Try the
gitcommand from your terminal, if it's not found then use this installer. - The repository also uses
maketo orchestrate compiling the JavaScript, running the server, and several other tasks. On Mac OSX, the easiest way to installmakeis through Apple's Command Line Tools for Xcode (requires free registration).
Clone this git repo to your machine via the terminal using the git clone command and then run make run from the root Calypso directory:
$ git clone git@github.com:Automattic/wp-calypso.git
$ cd wp-calypso
$ make runThe make run command will install any npm dependencies and start the development server. When changes are made to either the JavaScript files or the Sass stylesheets, the build process will run automatically. In some cases it will even automatically reload the code in the browser (for React components code). The build process compiles both the JavaScript and CSS to make sure that you have the latest versions of both.
To run Calypso locally, you'll need to add 127.0.0.1 calypso.localhost to your hosts file, and load the app at http://calypso.localhost:3000 instead of just localhost. This is necessary, because when running locally Calypso is using the remote version of the WordPress.com REST API, which allows only certain origins via our current authentication methods.