Skip to content

Headless WordPress Plugin

Run WordPress as a private CMS and rebuild your static site on Cloudflare Pages every time you publish.

A simple Headless Helper for WordPress

What does the Headless WordPress Plugin do?

Going headless means WordPress is only there to manage content. The real site is built somewhere else, such as an Astro or Next.js site on Cloudflare Pages. But the old WordPress front end is still live. Anyone can browse it, search engines can index it, and it ends up competing with your real site.

MRK WP Headless closes the WordPress front end without breaking the parts you still need. People who visit your WordPress URL are sent to the login screen. The REST API, wp-admin, cron and FluentCRM’s public links all keep working. That covers email signup confirmations, unsubscribe and manage-subscription pages, open and click tracking, and incoming webhooks.

Rebuild your static site automatically

A static site only shows new content after it rebuilds. MRK WP Headless connects WordPress to a Cloudflare Pages deploy hook, so a rebuild starts when you publish, update or unpublish content. Changes made close together are grouped into a single build, so editing a post ten times doesn’t use ten builds. You can also rebuild on a schedule or press Build now, and every build is logged with the reason it ran and Cloudflare’s response.

Why we built it

We run mrkwp.com headless: WordPress manages the content and Cloudflare Pages serves the site. We needed WordPress to stay private, FluentCRM email signups to keep working, and new posts to go live without a manual deploy. No single plugin did all three, so we built one, and we’re giving it away in case it helps you too.

How to set it up

  1. Download the plugin from GitHub and upload it through Plugins > Add New > Upload Plugin.
  2. Activate MRK WP Headless. Your WordPress front end now redirects guests to the login screen.
  3. In Cloudflare, open Workers & Pages > your project > Settings > Builds > Deploy hooks and create a hook.
  4. Paste the hook URL into Settings > Headless in WordPress, choose what should trigger a rebuild, and save.

Key Capabilities

How does it work?

1

Private WordPress front end

Guests are redirected to the login screen, so your CMS can't be browsed, indexed or mistaken for your real site.

2

REST API untouched

`/wp-json/`, wp-admin, admin-ajax and wp-cron keep working, so your front end, apps and integrations carry on as normal.

3

FluentCRM keeps working

Double opt-in confirmations, unsubscribe and manage-subscription pages, open and click tracking, and incoming webhooks all stay public.

4

Rebuild on publish

Publishing, updating or unpublishing content triggers a Cloudflare Pages rebuild. You choose which post types count.

5

Fewer wasted builds

Changes made within a few minutes of each other are sent as one build, saving Cloudflare build minutes.

6

Scheduled and manual builds

Rebuild hourly, twice daily, daily or weekly, or press Build now. The last 20 builds are logged with their reason and result.

Free & Open Source

Free Download

Headless WordPress Plugin is free. Download it from GitHub and install it like any other plugin.

Free forever
$0No licence key. No account.
  • The full plugin, free to use
  • Use it on as many sites as you like
  • Open source under GPLv2 or later
  • Read the code and report issues on GitHub
Download from GitHub(opens Headless WordPress Plugin on GitHub in a new tab)

How to install

  1. 1On GitHub, choose Code → Download ZIP.
  2. 2In WordPress, go to Plugins → Add New → Upload Plugin.
  3. 3Upload the ZIP file, then click Activate.
Got Questions?

Frequently Asked Questions

Is this plugin free to use?

Yes, it's completely free. Download it from our GitHub repository and install it like any other WordPress plugin.

Do FluentCRM email signups still work?

Yes. FluentCRM's public links stay public: double opt-in confirmation links, unsubscribe and manage-subscription pages, email open and click tracking, bounce handling, and incoming contact webhooks. The page you send people to after they confirm or unsubscribe stays public too, as does any page using the [fluentcrm_pref] shortcode.

Can I still preview posts?

Yes. Logged-in users are never redirected, so you can preview drafts and browse the WordPress front end while signed in.

Where do I get the Cloudflare Pages deploy hook

In the Cloudflare dashboard, go to Workers & Pages, open your project, then Settings > Builds > Deploy hooks, and create a hook for your production branch. Paste the URL into Settings > Headless. To keep the URL out of the database, add it to wp-config.php as MRKWP_HEADLESS_DEPLOY_HOOK instead.

Will every save trigger a new build?

No. The first change queues a build, and any changes within the next few minutes (5 by default) join that same build. Autosaves, revisions and drafts never trigger a build.

Why are my builds running late?

Queued and scheduled builds run on WP-Cron, which only runs when something loads WordPress. On a quiet headless site, set up a server cron job that requests wp-cron.php every 5 minutes.

Does it work with other hosts like Netlify or Vercel?

It's built and tested for Cloudflare Pages. Any service whose deploy hook accepts an empty HTTPS POST should also work, but we haven't tested them.

More Tools & Plugins

Related Products

View all products
Action Scheduler Cleaner
Performance & Database

Action Scheduler Cleaner

Do unnecessary scheduled actions slow down your WordPress site?

From $9.50 / yrView Product
Secure User REST API
Security & Hardening

Secure User REST API

Stop public snooping on your WordPress user REST endpoints.

FreeView Product
Search Exclude Plugin
Content Management

Search Exclude Plugin

Refine your search results by hiding specific posts or pages.

FreeView Product