Project

General

Profile

Actions

Feature #24987

open

Allow scriptable WordPress REST API access (Cloudflare bypass)

Added by Raffi Khatchadourian 5 days ago. Updated about 10 hours ago.

Status:
New
Priority name:
Normal
Assignee:
Category name:
WordPress (Permissions)
Target version:
-
Start date:
2026-05-09
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

I'd like scriptable access to my pages on khatchad.commons.gc.cuny.edu via the WordPress REST API—course pages, research-related pages, and similar long-lived content. WordPress's wp-admin is excellent for interactive editing; what it doesn't support is programmatic operations on many pages at once or in unattended pipelines, which is exactly what the REST API was designed for. The Cloudflare layer in front of the site currently blocks REST API access entirely, even with valid authentication.

The Blocker

Authenticated REST API requests to https://khatchad.commons.gc.cuny.edu/wp-json/wp/v2/pages return HTTP/2 403 with cf-mitigated: challenge and a captcha HTML body, never reaching WordPress. I verified with curl using a valid Application Password and Authorization: Basic header; the request is blocked at the Cloudflare layer regardless of headers or User-Agent.

Request

Could the Cloudflare configuration be adjusted to skip Bot Management for authenticated REST API requests—either:

  • a WAF custom rule to bypass the Managed Challenge when the request path matches /wp-json/wp/v2/* and the Authorization header is present, scoped to an opt-in list of accounts (starting with just mine if narrower scoping is helpful); or
  • an IP allow-list entry, if a per-account exception isn't workable.

What Scriptable Access Enables

  • Batch updates. Apply a change (a course code rename, a citation update, a recurring footer fix) across many pages atomically rather than editing each one in wp-admin.
  • CI checks on every change. Link validation, dead-image detection, HTML lint, accessibility audits before changes go live.
  • Open Educational Resources workflows. Push course materials from a public CC-BY Git repository so other CUNY instructors can fork and reuse them, with updates flowing back into Commons via the same pipeline.
  • Whole-site branching. Stage a coherent set of updates (e.g., a new semester's pages) and publish in one operation rather than as scattered per-post drafts.

These are operations the WordPress REST API was designed to support; the only thing missing is reachability past Cloudflare for authenticated callers.

Actions

Also available in: Atom PDF