An open API service indexing awesome lists of open source software.

https://github.com/lipex360x/wp-rest-api

Wordpress Plugin API Rest
https://github.com/lipex360x/wp-rest-api

php plop-generators wordpress-plugin

Last synced: 3 months ago
JSON representation

Wordpress Plugin API Rest

Awesome Lists containing this project

README

          

Wordpress Rest Plugin API Boilerplate


Wodpress API with Plop Generator

---



---

#### :bookmark_tabs: Content Index

- [Startup](#zap-startup)

- [Generators](#zap-generator)

- [REST Routes](#zap-rest-routes)

---

#### :zap: Startup
* Install Packages
- Run: `yarn` or `npm i` in terminal

* Install Plugins

- [WP File Manager](https://wordpress.org/plugins/wp-file-manager/)

- [JWT Authentication](https://br.wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)

Using ***WP File Manager***, insert in `wp-config.php`

```php
define('JWT_AUTH_SECRET_KEY', 'JWT_AUTH_SECRET_KEY_STRING');

define('JWT_AUTH_CORS_ENABLE', true);
```

* Postman (optional)

Download, install [Postman](https://www.postman.com/downloads/) and import `postman_collection.json` available in this project

Create the Global Variables called to use pre-request script
* *BASE_URL*
* *ADMIN_USER*
* *ADMIN_PASS*

Update the pre-script from *MODULE* path

---

#### :zap: Generator

- Run: `yarn gen` or `npm run gen` in terminal

- Follow the instructions

---

#### :zap: Rest Routes

http://[wordpress.url]/wp-json/api/[entity]

---

:point_up_2: [Go to Content Index](#bookmark_tabs-content-index)

---

:pushpin: Tips: for easier navigation by github, consider installing the [Octotree](https://chrome.google.com/webstore/detail/octotree-github-code-tree/bkhaagjahfmjljalopjnoealnfndnagc) plugin