Skip to content

lipex360x/wp-rest-api

Repository files navigation

Wordpress Rest Plugin API Boilerplate

Wodpress API with Plop Generator



📑 Content Index


⚡ Startup

  • Install Packages
  • Run: yarn or npm i in terminal
  • Install Plugins

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

define('JWT_AUTH_SECRET_KEY', 'JWT_AUTH_SECRET_KEY_STRING');

define('JWT_AUTH_CORS_ENABLE', true);
  • Postman (optional)

Download, install Postman 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


⚡ Generator

  • Run: yarn gen or npm run gen in terminal

  • Follow the instructions


⚡ Rest Routes

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


👆 Go to Content Index


📌 Tips: for easier navigation by github, consider installing the Octotree plugin