PHPackages                             wp-kit/rest-kit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. wp-kit/rest-kit

ActiveLibrary[API Development](/categories/api)

wp-kit/rest-kit
===============

A micro RAD solution for Wordpress REST API themes

1.1.1(5y ago)4801[3 issues](https://github.com/wp-kit/rest-kit/issues)MITPHPPHP ^7.4CI failing

Since May 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/wp-kit/rest-kit)[ Packagist](https://packagist.org/packages/wp-kit/rest-kit)[ RSS](/packages/wp-kit-rest-kit/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (7)Versions (12)Used By (0)

wp-kit/rest-kit
===============

[](#wp-kitrest-kit)

`rest-kit` is a micro [`RAD`](https://en.wikipedia.org/wiki/Rapid_application_development) solution for using Wordpress as a Headless CMS.

Installation
------------

[](#installation)

Download [Composer](https://getcomposer.org/download/) and install using this command

```
cd wp-content/themes
composer create-project wp-kit/rest-kit rest-kit --prefer-dist
```

Working with Bedrock?
---------------------

[](#working-with-bedrock)

Firstly, install Bedrock, then;

```
composer require wp-kit/rest-kit
cp -r vendor/wp-kit/rest-kit web/app/themes
(rm ./package.json || true) && mv web/app/themes/rest-kit/package.json ./package.json
(rm ./webpack.config.js || true) && mv web/app/themes/rest-kit/webpack.config.js ./webpack.config.js

// inside webpack.config.js change the following
const themeFolder = './web/app/themes/rest-kit';

npm i
npm run build

```

When should you use wp-kit/rest-kit?
------------------------------------

[](#when-should-you-use-wp-kitrest-kit)

If you're looking for a framework to be able to build and manage custom Gutenberg blocks (both React style or with ACF Blocks) and want to manage how blocks looks and are styled in the editor and want to consume Gutenberg block data via Wordpress Rest API, and would like to easily register Post Types and Taxonomies and organise your code contextually within Controller and PostType/Taxonomy classes then this is a the perfect framework. Features include;

- Webpack configuration to easily create / edit and style React-style Gutenberg blocks for the editor
- Gutenberg Blocks are JSONified and send in WP REST API response for Posts (CPT) and Pages
- ACF Blocks are easily registered via config and managed via view files for the editor
- ServiceProvider Config
- PostType Registration
- Taxonomy Registration
- Invoke Controllers on Conditions

Just want to get Blocks in WP REST Response?
--------------------------------------------

[](#just-want-to-get-blocks-in-wp-rest-response)

One of the key features on rest-kit is that it outputs JSON Blocks, including ACF Blocks, for Posts and Pages in the API response under a property `gblocks`. This framework is great when you want to also add custom React-style blocks or register and manage ACF Blocks but if you don't need those features or feel rest-kit is too overkill for you, we have abstracted the JSON Blocks feature away into it's own plugin:

[WP ACF Rest API Blocks](https://github.com/wp-kit/wp-acf-rest-api-blocks)

Recommended Plugins
-------------------

[](#recommended-plugins)

We recommend the following plugins depending your use case:

Plugin NameExplanation[WP Rest Filter](https://wordpress.org/plugins/wp-rest-filter/)In the boilerplate code for [wp-sapper-start](https://github.com/wp-kit/wp-sapper-start), we have included examples of filtering by term and author slugs, and have implemented this based on using WP Rest Filter. We generally recommend this plugin when seeking to fetch posts and pages primarily based on term slugs.[Yoast SEO](https://wordpress.org/plugins/wordpress-seo/)In the boilerplate code for [wp-sapper-start](https://github.com/wp-kit/wp-sapper-start), we have included examples of meta tags, and have implemented this based on using Yoast SEO and WP Rest Yoast Meta. We generally recommend this plugin in all cases to control tags within any framework you may be using.[WP Rest Yoast Meta](https://wordpress.org/plugins/wp-rest-yoast-meta/)In the boilerplate code for [wp-sapper-start](https://github.com/wp-kit/wp-sapper-start), we have included examples of meta tags, and have implemented this based on using Yoast SEO and WP Rest Yoast Meta. We generally recommend this plugin in all cases to control tags within any framework you may be using.[WP Rest API V2 Menus](https://wordpress.org/plugins/wp-rest-api-v2-menus/)In the boilerplate code for [wp-sapper-start](https://github.com/wp-kit/wp-sapper-start), we have included examples of fetching menus, and have implemented this based on using the endpoints provided by WP Rest API V2 Menus[Application Password](https://wordpress.org/plugins/application-passwords/)In the boilerplate code for [wp-sapper-start](https://github.com/wp-kit/wp-sapper-start), we have included examples of creating comments, form submissions and previewing draft post and pages; we have implemented this based on storing username and application password in a .env file which is read using server routes which sends a Basic authentication header to the API, this requires Application Password. We generally recommend this plugin when needing to write data back to the API or when needing to authenticate with Wordpress for any reason from your app. We recommend this over storing the raw password in .env or using WP oAuth Server which add more complexity than is neccessary due for a headless website.[ACF to REST API](https://en-gb.wordpress.org/plugins/acf-to-rest-api/)We generally recommend this plugin if you plan on using ACF in order to output field values within feild groups assigned to Posts and Pages, as oppose to Blocks. Any fields assigned to ACF Blocks are automatically pulled into the response when using rest-kit[WP REST Cache](https://wordpress.org/plugins/wp-rest-cache/)We generally recommend this plugin for all scenarios when using Wordpress as a headless CMS regardless of the framework you are using.Gists
-----

[](#gists)

**Menu Endpoint**

We have recently removed the Menu endpoint by default from the boilerplate code in favour of using [WP Rest API V2 Menus](https://wordpress.org/plugins/wp-rest-api-v2-menus/). You can easily add this back:

[Add Menu endpoint in wp-kit/rest-kit, if you don't want to use plugins/wp-rest-api-v2-menus](https://gist.github.com/terence1990/64ac107521142f2e65d8bf9053f7934f)

**Adjusting Gutenberg JSON**

We have recently pruned the transformation code right back so the schema of blocks received in the response is exactly the schema provided by `parse_blocks()`. You can change and transform this however you wish:

[Adjusting Gutenberg Block output in REST Response](https://gist.github.com/terence1990/223aa816df7d600005e55c39e9598b5d)

Get Involved
------------

[](#get-involved)

Any help is appreciated. The project is open-source and we encourage you to participate. You can contribute to the project in multiple ways by:

- Reporting a bug issue
- Suggesting features
- Sending a pull request with code fix or feature
- Following the project on [GitHub](https://github.com/wp-kit)
- Sharing the project around your community

Requirements
------------

[](#requirements)

Wordpress 5+

PHP 7.4+

Composer

Node

NPM

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within wp-kit/rest-kit, please send an e-mail to  or raise an issue on this repo. All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

wp-kit/rest-kit is open-sourced software licensed under the MIT License.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance5

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 98.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~68 days

Recently: every ~48 days

Total

10

Last Release

1929d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4cf98026bd84498477fafbfb9648807bf87c5ec9a0a404db2e3b7e2739cc8f9?d=identicon)[terence1990](/maintainers/terence1990)

---

Top Contributors

[![terence1990](https://avatars.githubusercontent.com/u/8171301?v=4)](https://github.com/terence1990 "terence1990 (101 commits)")[![mattpilott](https://avatars.githubusercontent.com/u/2401925?v=4)](https://github.com/mattpilott "mattpilott (2 commits)")

---

Tags

wordpressradOOPwpkitrapid application developmentrestkit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wp-kit-rest-kit/health.svg)

```
[![Health](https://phpackages.com/badges/wp-kit-rest-kit/health.svg)](https://phpackages.com/packages/wp-kit-rest-kit)
```

###  Alternatives

[airesvsg/acf-to-rest-api

Exposes Advanced Custom Fields Endpoints in the WordPress REST API

1.4k75.0k](/packages/airesvsg-acf-to-rest-api)[humanmade/mercator

WordPress multisite domain mapping for the modern era.

529180.9k3](/packages/humanmade-mercator)[wordpress/mcp-adapter

Adapter for Abilities API, letting WordPress abilities to be used as MCP tools, resources or prompts

74855.8k1](/packages/wordpress-mcp-adapter)[wp-graphql/wp-graphql-woocommerce

WooCommerce bindings for WPGraphQL

69146.8k](/packages/wp-graphql-wp-graphql-woocommerce)[sybrew/the-seo-framework

An automated, advanced, accessible, unbranded and extremely fast SEO solution for any WordPress website.

47078.8k](/packages/sybrew-the-seo-framework)[hieu-le/wordpress-xmlrpc-client

A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API with full test suite built in

118158.5k2](/packages/hieu-le-wordpress-xmlrpc-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
