Download the PHP package wp-kit/rest-kit without Composer

On this page you can find all versions of the php package wp-kit/rest-kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rest-kit

wp-kit/rest-kit

is a micro solution for using Wordpress as a Headless CMS.

Installation

Download Composer and install using this command

Working with Bedrock?

Firstly, install Bedrock, then;

When should you use wp-kit/rest-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;

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

Recommended Plugins

We recommend the following plugins depending your use case:

Plugin Name Explanation
WP Rest Filter In the boilerplate code for 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 In the boilerplate code for 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 In the boilerplate code for 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 In the boilerplate code for 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 In the boilerplate code for 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 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 We generally recommend this plugin for all scenarios when using Wordpress as a headless CMS regardless of the framework you are using.

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. 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

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

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:

Requirements

Wordpress 5+

PHP 7.4+

Composer

Node

NPM

Security Vulnerabilities

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

License

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


All versions of rest-kit with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
illuminate/http Version ^8.0
wp-kit/registry Version ^2.0
wp-kit/foundation Version ^2.0
filp/whoops Version ^2.7
wp-kit/invoker Version ^2.0.5
wp-kit/acf-integration Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wp-kit/rest-kit contains the following files

Loading the files please wait ....