PHPackages                             cedaro/wprestcop - 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. cedaro/wprestcop

ActiveWordpress-plugin

cedaro/wprestcop
================

A WordPress plugin for managing access to the WP REST API.

v1.0.0(10y ago)7216912[1 PRs](https://github.com/cedaro/wprestcop/pulls)GPL-2.0+PHPPHP &gt;=5.4.0

Since Feb 6Pushed 3y ago9 watchersCompare

[ Source](https://github.com/cedaro/wprestcop)[ Packagist](https://packagist.org/packages/cedaro/wprestcop)[ Docs](https://github.com/cedaro/wprestcop)[ RSS](/packages/cedaro-wprestcop/feed)WikiDiscussions develop Synced 2mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

WP REST Cop
===========

[](#wp-rest-cop)

Manage access to the WP REST API with rate limits and IP-based rules.

**Contributors:** [Brady Vercher](https://github.com/bradyvercher)**Requires:** WP 4.4+, PHP 5.4+ **Tested up to:** 4.4 **License:** [GPL-2.0+](http://www.gnu.org/licenses/gpl-2.0.html)

Rate Limits
-----------

[](#rate-limits)

Rate limits allow for configuring the number of requests a client can make within a certain interval. The default in *WP Rest Cop* is 500 requests per hour.

The rate limit functionality requires a [persistent object cache](https://codex.wordpress.org/Class_Reference/WP_Object_Cache).

### Headers

[](#headers)

A few headers are sent with every request so clients can keep track of their current limit:

  Header Description    `X-RateLimit-Limit` Requests allowed per interval.   `X-RateLimit-Remaining` Remaining requests allowed in the current interval.   `X-RateLimit-Reset` Seconds until the limit is reset.  If client has reached their limit, an additional header will be sent.

  Header Description    `Retry-After` Seconds until the limit is reset  Clients may send a `HEAD` request to view their current limit without ticking the meter.

### Configuring Settings

[](#configuring-settings)

Configure the default `limit` and `interval` settings using the simple API from the main plugin instance:

```
