Skip to content

Commit

Permalink
Merge pull request WP-API#390 from kadamwhite/use-wp-cli-to-set-perma…
Browse files Browse the repository at this point in the history
…link

Alter installation steps to use wp-cli for plugin and permanlink setup
  • Loading branch information
rmccue committed Aug 1, 2014
2 parents 7c2cbc6 + 9e50fc8 commit eedb81f
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,30 @@ testing environment in a few easy steps:
vagrant up
```

5. Browse to http://vagrant.local/wp/wp-admin/plugins.php and activate the WP
API plugin
5. Activate the plugin:

```bash
vagrant ssh -c 'cd /vagrant && wp plugin activate json-rest-api'
```
Username: admin
Password: password

6. Set the permalink structure to something other than the default, in order to
enable the http://vagrant.local/wp-json/ endpoint URL (if you skip this
step, it can be accessed at http://vagrant.local/?json_route=/):

```bash
vagrant ssh -c "cd /vagrant && wp rewrite structure '/%postname%/'"
```

6. Browse to http://vagrant.local/wp/wp-admin/options-permalink.php and set
the permalink structure to anything other than "Default"
You're done! You should now have a WordPress site available at
http://vagrant.local; you can access the API via http://vagrant.local/wp-json/

7. Browse to http://vagrant.local/wp-json/ (or if the permalink structure is
still "Default," to http://vagrant.local/?json_route=/)
To access the admin interface, visit http://vagrant.local/wp/wp-admin and log
in with the credentials below:

```
Username: admin
Password: password
```

### Testing

Expand Down

0 comments on commit eedb81f

Please sign in to comment.