Title: Disable REST API
Author: Dave McHale
Published: <strong>3. Oktober 2014</strong>
Last modified: 14. September 2023

---

Plugins durchsuchen

![](https://ps.w.org/disable-json-api/assets/banner-772x250.png?rev=1001011)

Dieses Plugin **ist nicht mit den jüngsten 3 Hauptversionen von WordPress** getestet
worden. Es wird möglicherweise nicht mehr gewartet oder unterstützt und kann Kompatibilitätsprobleme
haben, wenn es mit neueren Versionen von WordPress verwendet wird.

![](https://ps.w.org/disable-json-api/assets/icon-256x256.png?rev=1001011)

# Disable REST API

 Von [Dave McHale](https://profiles.wordpress.org/dmchale/)

[Herunterladen](https://downloads.wordpress.org/plugin/disable-json-api.zip)

 * [Details](https://de.wordpress.org/plugins/disable-json-api/#description)
 * [Rezensionen](https://de.wordpress.org/plugins/disable-json-api/#reviews)
 *  [Installation](https://de.wordpress.org/plugins/disable-json-api/#installation)
 * [Entwicklung](https://de.wordpress.org/plugins/disable-json-api/#developers)

 [Support](https://wordpress.org/support/plugin/disable-json-api/)

## Beschreibung

The most comprehensive plugin for controlling access to the WordPress REST API!

Works as a „set it and forget it“ install. Just upload and activate, and the entire
REST API will be inaccessible to your general site visitors.

But if you do need to grant access to some endpoints, you can do that too. Go to
the Settings page and you can quickly whitelist individual endpoints (or entire 
branches of endpoints) in the REST API.

You can even do this on a per-user-role basis, so your unauthenticated users have
one set of rules while WooCommerce customers have another while Subscribers and 
Editors and Admins all have their own. NOTE: Out of the box, all defined user roles
will still be granted full access to the REST API until you choose to manage those
settings.

For most versions of WordPress, this plugin will return an authentication error 
if a user is not allowed to access an endpoint. For legacy support, WordPress 4.4,
4.5, and 4.6 use the provided `rest_enabled` filter to disable the entire REST API.

## Screenshots

 * [[
 * Der JSON wird von einer Website zurückgegeben, deren API über Filter deaktiviert
   ist (WP-Versionen 4.4, 4.5, 4.6).
 * [[
 * Der JSON wurde von einer Website zurückgegeben, deren API über Authentifizierungsmethoden
   deaktiviert wurde (WP-Versionen 4.7+).
 * [[
 * The Settings page lets you selectively whitelist endpoints registered with the
   REST API, on a per-user-role basis.

## Installation

 1. Lade das Verzeichnis `disable-json-api` per FTP in das Verzeichnis `/wp-content/
    plugins/` hoch.
 2. Alternativ kannst du auch die Datei `disable-json-api_v#.#.zip` über die Seite „
    Plugins > Neu hinzufügen“ in deinem WordPress-Adminbereich hochladen.
 3. Aktiviere das Plugin in WordPress über das Menü ‚Plugins‘

## FAQ

### Wie weiß ich, dass das Plugin funktioniert?

Während du als Benutzer in WordPress angemeldet bist, funktioniert die REST-API 
wie vorgesehen. Aus diesem Grund musst du einen neuen
 Browser – oder Chromes Inkognito-
Modus – benutzen, um deine Website mit einer sauberen Sitzung zu testen. Gehe dazu
zu yourdomain.com/wp-json/ (oder yourdomain.com/?rest_route=/ wenn du hübsche Permalinks
deaktiviert hast), während du NICHT ANGEMELDET bist, um die Ergebnisse zu testen.
Du wirst sehen, dass ein Authentifizierungsfehler zurückgegeben wird, wenn das Plugin
aktiv ist. „DRA: Nur authentifizierte Benutzer können auf die REST-API zugreifen.“

### Does this plugin disable every REST API that is installed on my site?

This plugin is ONLY meant to disable endpoints accessible via the core REST API 
that is part of WordPress itself. If a plugin or theme has implemented their own
REST API (not to be confused with implementing their own endpoints within the WordPress
API) this plugin will have no effect.

## Rezensionen

![](https://secure.gravatar.com/avatar/cd718b2b1b89af40b305136d24c22af2d8bfd11a113206d562d97467b6ff7862?
s=60&d=retro&r=g)

### 󠀁[Excellent](https://wordpress.org/support/topic/excellent-13544/)󠁿

 [graphicvision1](https://profiles.wordpress.org/graphicvision1/) 19. August 2024

What else can I say, this plugin does exactly what its supposed to do. It’s easy
to understand and works perfectly. So well done!

![](https://secure.gravatar.com/avatar/28f29c0bd22c800b94380bab32f1d21f509dcfd23c6a04c25d2577971ca70616?
s=60&d=retro&r=g)

### 󠀁[Fantastic](https://wordpress.org/support/topic/fantastic-3276/)󠁿

 [Wombat Plugins](https://profiles.wordpress.org/maartenbelmans/) 29. Dezember 2023

The plugin does what it says on the tin, without being pretentious. Absolutely fantastic!

![](https://secure.gravatar.com/avatar/2575687b68f004ac334b350150c3a0fe3ae1872f5b07bcb28e082ee2d0ba9f73?
s=60&d=retro&r=g)

### 󠀁[One of the must have plugins.](https://wordpress.org/support/topic/one-of-the-must-have-plugins-4/)󠁿

 [ucsendre](https://profiles.wordpress.org/ucsendre/) 14. September 2023

I always start my WordPress installations with this plugin (among a few other ones).
A must have on all sites. Thank you.

![](https://secure.gravatar.com/avatar/6ee556d084a00f6d8da3d00fb4abd769110d2c1abefdbe4c0411bda05e1a0826?
s=60&d=retro&r=g)

### 󠀁[Still works on WP 6.2](https://wordpress.org/support/topic/still-works-on-wp-6-2/)󠁿

 [mw815371](https://profiles.wordpress.org/mw815371/) 3. April 2023

The plugin still works for me on WordPress 6.2. It’s great to have the option to
allow API access where I need it and block everything else.

![](https://secure.gravatar.com/avatar/021af8b59a1c6fdd0d92b71f2a1a8d5bf6c40395d059fdbede4bb520af0cb33a?
s=60&d=retro&r=g)

### 󠀁[Just what I was looking for](https://wordpress.org/support/topic/just-what-i-was-looking-for-535/)󠁿

 [Ronny Adsetts](https://profiles.wordpress.org/ronnyadsetts/) 26. Januar 2023

Allows locking the WP API behind auth and selectively allowing it where needed. 
Despite the lack of plugin updates, the author does have an active github repo so
don’t let that put you off.

![](https://secure.gravatar.com/avatar/300547007f18e9a5b8eab3d451fd11f18a1c008b405403387d36656247e2d962?
s=60&d=retro&r=g)

### 󠀁[Excellent solution](https://wordpress.org/support/topic/excellent-solution-67/)󠁿

 [Ben Sibley](https://profiles.wordpress.org/bensibley/) 20. Januar 2023

Blocking the REST API entirely breaks plugins that require this functionality, so
being able to selectively enable routes is perfect. I recommend this plugin to everyone
who uses Independent Analytics to secure their site while still enabling analytics
to be recorded.

 [ Alle 38 Rezensionen lesen ](https://wordpress.org/support/plugin/disable-json-api/reviews/)

## Mitwirkende und Entwickler

„Disable REST API“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin
mitgewirkt:

Mitwirkende

 *   [ Dave McHale ](https://profiles.wordpress.org/dmchale/)
 *   [ Tang Rufus ](https://profiles.wordpress.org/tangrufus/)

„Disable REST API“ wurde in 14 Sprachen übersetzt. Danke an [die Übersetzer](https://translate.wordpress.org/projects/wp-plugins/disable-json-api/contributors)
für ihre Mitwirkung.

[Übersetze „Disable REST API“ in deine Sprache.](https://translate.wordpress.org/projects/wp-plugins/disable-json-api)

### Interessiert an der Entwicklung?

[Durchstöbere den Code](https://plugins.trac.wordpress.org/browser/disable-json-api/),
sieh dir das [SVN-Repository](https://plugins.svn.wordpress.org/disable-json-api/)
an oder abonniere das [Entwicklungsprotokoll](https://plugins.trac.wordpress.org/log/disable-json-api/)
per [RSS](https://plugins.trac.wordpress.org/log/disable-json-api/?limit=100&mode=stop_on_copy&format=rss).

## Änderungsprotokoll

#### 1.8

 * Tested up to WP v6.3
 * Added `dra_error_message` filter so devs can customize the access error message
 * Fixed bug that caused fatal errors if activating plugin on installations running
   the LearnPress plugin
 * Changed minimum requirements to PHP 5.6 (up from 5.3) and WordPress 4.9 (up from
   4.4). Adding docblock comments to support minimums.

#### 1.7

 * Tested up to WP v5.8
 * Replace use of filemtime() with plugin version number for static file enqueues.
   Props @tangrufus for bringing this up!
 * Fixed logic bug for role-based default_allow rules. Props @msp1974 for the report!
 * Few small code-style updates

#### 1.6

 * Tested up to WP v5.6
 * Added support for managing endpoint access on a per-user-role basis
 * Soooooooo many small changes behind the scenes to support the above

#### 1.5.1

 * Tested up to WP v5.5

#### 1.5

 * Tested up to WP v5.3
 * Added enforcement for WordPress and PHP minimum version requirements
 * Fixed minor bug to prevent unintended empty routes
 * Minor text updates and adding textdomain to translation functions that didn’t
   have them

#### 1.4.3

 * `load_plugin_textdomain()` für i18n hinzugefügt

#### 1.4.2

 * Problem behoben, das unbeabsichtigtes Entsperren von Endpunkten verursachte, 
   wenn ein anderer WP_Error existierte, bevor dieses Plugin seine Arbeit verrichtete.

#### 1.4.1

 * Fehler behoben beim „echo der Text-URL“ zur primären Plugin-Seite im WP-Dashboard

#### 1.4

 * Getestet für WP v4.8
 * Getestet mit PHP 5.3+
 * Bildschirm für Einstellungen hinzugefügt
 * Website-Administratoren können nun Routen auf der Whitelist auswählen, auf die
   sie unauthentifizierten Zugriff gewähren möchten.
 * `dra_allow_rest_api`-Filter zum is_logged_in()-Check hinzugefügt, so dass Entwickler
   granularer mit Berechtigungen arbeiten können.
 * Respekt vor @tangrufus für all die Hilfe, die in dieser Version geleistet wurde.

#### 1.3

 * Getestet mit WP v4.7
 * Neue Funktionen zur Erhöhung von Authentifizierungsfehlern in 4.7+ für nicht 
   angemeldete Benutzer hinzugefügt.

#### 1.2

 * Getestet für WP v4.5
 * Entfernen von Aktionen, die REST-Informationen an den Header veröffentlichen.

#### 1.1

 * Aktualisiert, um die neuen Filter zu unterstützen, die in der 2.0 Beta-API erstellt
   wurden.

#### 1.0

 * Erste Version

## Meta

 *  Version **1.8**
 *  Zuletzt aktualisiert **vor 3 Jahren**
 *  Aktive Installationen **90.000+**
 *  WordPress-Version ** 4.9 oder höher **
 *  Getestet bis **6.3.8**
 *  PHP-Version ** 5.6 oder höher **
 *  Sprachen
 * [Asturian](https://ast.wordpress.org/plugins/disable-json-api/), [Chinese (Taiwan)](https://tw.wordpress.org/plugins/disable-json-api/),
   [Dutch](https://nl.wordpress.org/plugins/disable-json-api/), [Dutch (Belgium)](https://nl-be.wordpress.org/plugins/disable-json-api/),
   [English (US)](https://wordpress.org/plugins/disable-json-api/), [French (France)](https://fr.wordpress.org/plugins/disable-json-api/),
   [German](https://de.wordpress.org/plugins/disable-json-api/), [Portuguese (Portugal)](https://pt.wordpress.org/plugins/disable-json-api/),
   [Russian](https://ru.wordpress.org/plugins/disable-json-api/), [Spanish (Colombia)](https://es-co.wordpress.org/plugins/disable-json-api/),
   [Spanish (Ecuador)](https://es-ec.wordpress.org/plugins/disable-json-api/), [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/disable-json-api/),
   [Spanish (Spain)](https://es.wordpress.org/plugins/disable-json-api/), [Spanish (Venezuela)](https://ve.wordpress.org/plugins/disable-json-api/)
   und [Swedish](https://sv.wordpress.org/plugins/disable-json-api/).
 *  [Übersetze in deine Sprache](https://translate.wordpress.org/projects/wp-plugins/disable-json-api)
 * Schlagwörter
 * [admin](https://de.wordpress.org/plugins/tags/admin/)[api](https://de.wordpress.org/plugins/tags/api/)
   [JSON](https://de.wordpress.org/plugins/tags/json/)[rest](https://de.wordpress.org/plugins/tags/rest/)
   [rest-api](https://de.wordpress.org/plugins/tags/rest-api/)
 *  [Erweiterte Ansicht](https://de.wordpress.org/plugins/disable-json-api/advanced/)

## Bewertungen

 4.8 von 5 Sternen.

 *  [  36 5-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/disable-json-api/reviews/?filter=5)
 *  [  0 4-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/disable-json-api/reviews/?filter=4)
 *  [  1 3-Sterne-Rezension     ](https://wordpress.org/support/plugin/disable-json-api/reviews/?filter=3)
 *  [  0 2-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/disable-json-api/reviews/?filter=2)
 *  [  1 1-Sterne-Rezension     ](https://wordpress.org/support/plugin/disable-json-api/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/disable-json-api/reviews/#new-post)

[Alle Rezensionen anzeigen](https://wordpress.org/support/plugin/disable-json-api/reviews/)

## Mitwirkende

 *   [ Dave McHale ](https://profiles.wordpress.org/dmchale/)
 *   [ Tang Rufus ](https://profiles.wordpress.org/tangrufus/)

## Support

Möchtest du etwas mitteilen? Brauchst du Unterstützung?

 [Support-Forum anzeigen](https://wordpress.org/support/plugin/disable-json-api/)