What Is the WordPress REST API? A Plain-English Guide for Business Owners
What is the WordPress REST API? A plain-English guide to what uses it, what it makes public, application passwords, business uses and how to restrict it.

On this page
- The WordPress REST API explained in plain language
- What already uses it on your site
- What's public by default
- Authentication and application passwords
- When a business actually needs the REST API
- Don't switch it off; restrict it
- Common REST API errors
- Performance and the REST API
- How to see the WordPress REST API on your own site
- REST API, XML-RPC or webhooks: which one an integration uses
- When to get help
- FAQs
- The WordPress REST API lets other software and the block editor read and change site content through URLs under /wp-json/, returning data as JSON.
- Published content is public through it by default, while drafts, user details beyond public authors, orders and settings need authentication.
- Do not switch the REST API off, because the editor and many plugins depend on it; restrict sensitive endpoints and use application passwords for integrations.
What is the WordPress REST API? It is a built-in way for other software to read and change your site's content over the web. It works through URLs under /wp-json/ on your domain and sends data back as JSON instead of web pages. The block editor, many plugins, mobile apps and integrations with CRMs or other systems all use it. Most site owners never touch it directly, but it is worth knowing what it exposes and how to keep it secure.
Short answer: The WordPress REST API is a built-in way for other software to read and change your site's content through URLs under /wp-json/, returning data as JSON. The block editor, many plugins, apps and CRM integrations depend on it. Leave it switched on, and restrict sensitive endpoints instead of disabling it, so nothing breaks.
This guide explains the WordPress REST API in plain language: what already uses it on your site, what is public by default, how authentication works, when a business actually needs it and how to restrict it safely without breaking anything.
The WordPress REST API explained in plain language
Think of your website as having two doors. The front door serves web pages to visitors' browsers. The REST API is a side door that serves the same content as structured data to programs. A program can ask for the latest ten posts, a product's price or a page's content, and get back clean data without any design around it.
Each type of content has its own address, called an endpoint. For example, /wp-json/wp/v2/posts lists published posts, /wp-json/wp/v2/pages lists pages, and plugins such as WooCommerce add their own endpoints under their own namespace. A program reads data with a GET request and, if it has permission, creates or updates content with POST, PUT or DELETE requests.
| Term | Plain meaning |
|---|---|
| Endpoint | A URL that returns or accepts one kind of data, such as posts |
| JSON | A simple text format for data that programs read easily |
| Namespace | The group an endpoint belongs to, such as wp/v2 for core or a plugin's own name |
| Authentication | Proving who is making the request, so private actions are allowed |
| Application password | A separate password for one integration, which can be revoked on its own |
What already uses it on your site
Even if you have never heard of it, your site probably relies on the REST API every day:
- The block editor. Gutenberg loads and saves posts, blocks, media and settings through the REST API.
- Plugins. Form builders, SEO plugins, page builders, caching tools and WooCommerce use it for admin screens and background tasks.
- The WordPress mobile app and Jetpack-style services connect through it.
- Integrations. Automation tools, CRMs, inventory systems and marketing tools often read or push data through it.
- Headless or app front ends that use WordPress only as a content store.
The older XML-RPC system did some of these jobs before the REST API existed; WordPress XML-RPC explained covers when that can be switched off.
What's public by default
Anything already public on your site is also readable through the REST API without logging in: published posts, pages, categories, tags, media details and public custom post types. That is by design and generally not a risk, since the same content is visible on the website.
| Data | Public without login? | Notes |
|---|---|---|
| Published posts and pages | Yes | Same as on the website |
| Drafts and private posts | No | Need an authenticated user with permission |
| Users list | Partly | Shows usernames of people who have published posts; often worth restricting |
| WooCommerce orders and customers | No | Need API keys with the right permissions |
| Site settings | No | Administrators only |
The users endpoint is the one most site owners want to tighten, because it can reveal login usernames. Combined with weak passwords, that helps attackers. Restricting it, and using strong passwords and two-factor login as covered in how to secure your WordPress login, closes that gap.
Authentication and application passwords
To do anything beyond reading public content, a request must be authenticated. There are a few ways:
- Cookie authentication is used inside the WordPress admin. When you are logged in, the editor's requests carry your session and a security token automatically.
- Application passwords are built into WordPress. Under Users, Profile, you create a named password for one integration. It works only for API access, not for logging in to the dashboard, and you can revoke it without changing your main password.
- Plugin-specific keys such as WooCommerce REST API keys, which can be read-only or read-write.
- OAuth or token plugins for more complex setups.
Give each integration its own user with the lowest role that works, and its own application password or key. WordPress user roles explained helps choose the right role. Always use https, so credentials are not sent in plain text.
When a business actually needs the REST API
Most small business websites never need custom REST API work. It becomes useful when:
- You want website form entries or WooCommerce orders sent automatically to a CRM, ERP or accounting tool. See connecting website forms to a CRM.
- Stock, prices or products need to sync with an inventory or billing system.
- A mobile app needs to show the same content or products as the website.
- You want a headless front end built with a JavaScript framework; headless WordPress explained covers whether that is worth it.
- Several sites need to share content, such as a group of branch or brand sites.
- You need a custom endpoint that exposes only specific data for a partner or app.
Custom endpoints are usually built as a small plugin so they survive theme changes; custom WordPress plugin development explains that approach.
Don't switch it off; restrict it
Some security guides suggest disabling the REST API completely. On a modern WordPress site that breaks the block editor, many plugins and integrations. A better approach is to restrict what is exposed:
- Restrict the users endpoint to logged-in users, through a security plugin setting or a small code snippet.
- Remove or protect custom endpoints added by plugins you no longer use, by deactivating and deleting those plugins.
- Use the lowest-permission keys for integrations, and revoke them when a tool is retired.
- Rate-limit or block abusive API traffic at the firewall; WordPress firewalls explained covers how.
- Keep WordPress and plugins updated, since API vulnerabilities are usually fixed in updates.
Treat the REST API as part of your general hardening, alongside the steps in the WordPress security checklist.
The most visible REST API error is in the block editor itself; if pages won't save, see how to fix the WordPress "Updating failed" error.
Common REST API errors
| Error or symptom | Likely cause | What to check |
|---|---|---|
| Editor shows "Updating failed" or "The response is not a valid JSON response" | REST API blocked by a security plugin, firewall or wrong permalinks | Security settings, firewall logs, re-save permalinks |
| 401 Unauthorized | Missing or wrong credentials | Application password, user role, https |
| 403 Forbidden | User lacks permission, or a firewall rule blocks the request | Role capabilities, firewall rules |
| 404 on /wp-json/ | Permalinks or server rewrite rules not working | Permalink settings, server configuration |
Site Health under Tools also reports when the REST API is not reachable, which is a quick first check.
Performance and the REST API
REST API requests run WordPress and PHP just like page loads, but they are usually not served from the page cache. A badly built integration that polls the site every few seconds, or a front end that makes dozens of API calls per page, can slow the whole site down, particularly on shared hosting. Ask integrations to fetch only the fields they need, to sync changes in batches rather than one record at a time, and to use webhooks where possible so WordPress sends data when something changes instead of being asked constantly. Check your server logs if the site slows down after a new tool is connected.
How to see the WordPress REST API on your own site
You do not need any tools to look at it. Open your browser and visit your own domain followed by /wp-json/. You will see a long block of text listing the routes your site offers: WordPress core routes under wp/v2, and extra routes added by plugins such as WooCommerce, forms or SEO plugins. That list alone shows how many plugins rely on the REST API.
A few addresses are worth checking:
- /wp-json/wp/v2/posts shows your published posts as data. This is normal and matches what is already public on the site.
- /wp-json/wp/v2/users lists authors who have published content. Check that it does not reveal admin usernames you would rather keep private; a security plugin or a small code change can limit it.
- /wp-json/wc/v3/orders on a WooCommerce store should return an authentication error when you are logged out. If it ever returns order data publicly, treat it as urgent.
If your permalinks are set to Plain, the same routes work through ?rest_route= instead of /wp-json/. If /wp-json/ shows an error page, something such as a security rule, a firewall or a broken permalink setting is blocking it, which can also stop the block editor from saving.
REST API, XML-RPC or webhooks: which one an integration uses
| REST API | XML-RPC | Webhooks | |
|---|---|---|---|
| Direction | Another system asks WordPress for data or sends changes | Another system calls WordPress (older method) | WordPress or a plugin pushes data out when something happens |
| Typical use | Block editor, mobile apps, headless sites, CRM syncs | Older apps and Jetpack features | New order or form entry sent to a CRM, Zapier or Make |
| Address | /wp-json/ | /xmlrpc.php | A URL you give the plugin |
| Security approach | Application passwords or OAuth, restricted endpoints | Often disabled if nothing uses it | Secret keys and HTTPS-only URLs |
For most business integrations, a form or WooCommerce webhook is the simplest route; the REST API suits two-way syncs. XML-RPC is the older method and can usually be switched off. If you need an integration built, you can hire a WordPress developer for it.
What I check on client sites: whether /wp-json/ loads, whether user lists are exposed, which application passwords exist under Users > Profile, and whether a security plugin is blocking the editor's requests.
When to get help
Get help when the block editor shows "Updating failed", when you need WordPress connected to a CRM, app or inventory system, or when an integration needs secure authentication. Hire a WordPress developer to plan and build it, or see WordPress website development. Get in touch with what you want to connect.
If a WooCommerce integration gets a 401 Unauthorized reply, see fixing the WooCommerce REST API 401 error.
Related fixes: WooCommerce not sending order emails and shipping not showing at WooCommerce checkout.
FAQs
What is the WordPress REST API?
It is a built-in interface that lets other programs read and change WordPress content through URLs under /wp-json/, receiving data as JSON. The block editor and many plugins depend on it.
Is the WordPress REST API a security risk?
Not by itself. Public endpoints show content that is already public. The main step is to restrict the users endpoint, use strong authentication for integrations and keep plugins updated.
Should I disable the WordPress REST API?
No. Disabling it breaks the block editor and many plugins. Restrict sensitive endpoints instead.
What are application passwords in WordPress?
They are separate passwords created per integration under your user profile. They work only for API access and can be revoked individually without changing your login password.
Do I need the REST API for a normal business website?
You use it already through the editor and plugins, but you only need custom REST API work for integrations, apps, headless front ends or syncing with other systems.
Where do I find the WordPress REST API on my site?
Add /wp-json/ to the end of your domain in a browser. You will see the list of available routes. Core content lives under /wp-json/wp/v2/, and plugins add their own routes alongside it.
How do I test the WordPress REST API?
Open yourdomain/wp-json/wp/v2/posts in a browser. If you see JSON data, it works. For a quick health check, Tools > Site Health also reports when REST API requests fail.
Can the WordPress REST API connect my site to a CRM?
Yes. A CRM can read or create posts, users or WooCommerce orders through the REST API using an application password, though for one-way sending of form entries a webhook or the form plugin's own integration is often simpler.
Need help with your website?
I'm a freelance WordPress developer building fast, SEO-friendly websites since 2020. Tell me what you need and I'll reply with a plan and a fixed quote, usually within 24 hours.


