# API05004: WordPress API Disabled

## What This Means[​](#what-this-means "Directe link naar What This Means")

The WordPress REST API is disabled on your site. All modern WordPress functionality, including WooCommerce and WCPOS, depends on this API.

## Common Causes[​](#common-causes "Directe link naar Common Causes")

* **Security plugin** — A plugin is blocking REST API access
* **Hosting restriction** — Your host disabled the REST API
* **Custom code** — A theme or plugin disabled the API
* **Firewall rules** — WAF blocking REST API endpoints

## How to Fix[​](#how-to-fix "Directe link naar How to Fix")

### 1. Test the REST API[​](#1-test-the-rest-api "Directe link naar 1. Test the REST API")

Visit `https://yoursite.com/wp-json/` in your browser:

* Should return JSON with available routes
* If you get an error or nothing, it's blocked

### 2. Check Security Plugins[​](#2-check-security-plugins "Directe link naar 2. Check Security Plugins")

Common plugins that block REST API:

**Wordfence:**

* Firewall → All Firewall Options
* Disable "Disable REST API" option

**iThemes Security:**

* Security → Settings → WordPress Tweaks
* Enable REST API

**Disable REST API Plugin:**

* Deactivate this plugin entirely

### 3. Check for Custom Code[​](#3-check-for-custom-code "Directe link naar 3. Check for Custom Code")

Look in your theme's `functions.php` or custom plugins for:

```
// This code disables REST API - remove it

add_filter('rest_authentication_errors', function($result) {

    return new WP_Error('rest_disabled', 'REST API disabled');

});
```

### 4. Check .htaccess[​](#4-check-htaccess "Directe link naar 4. Check .htaccess")

Remove any rules blocking `/wp-json/`:

```
# Bad - blocks REST API

RewriteRule ^wp-json - [F,L]
```

### 5. Contact Hosting Provider[​](#5-contact-hosting-provider "Directe link naar 5. Contact Hosting Provider")

Some hosts block REST API by default:

* Request they enable it
* Ask about any security restrictions
* Check hosting documentation

## Why REST API Matters[​](#why-rest-api-matters "Directe link naar Why REST API Matters")

The WordPress REST API is essential for:

* Mobile apps
* Third-party integrations
* WooCommerce functions
* WCPOS operation

Disabling it breaks many features.

## Related Errors[​](#related-errors "Directe link naar Related Errors")

* [API05001](/nl/error-codes/API05001.md) — WooCommerce API Disabled
* [API03006](/nl/error-codes/API03006.md) — Unsupported Method
