// Hatch.md

Does Astro Make WordPress More Secure? What Stays Exposed

Does Astro Make WordPress More Secure? What Stays Exposed

“Static sites are more secure” is repeated so often that it sounds like a measured result. It is closer to a half-truth. A frontend that serves pages from Cloudflare does remove some work from your WordPress server. It does not remove the login page, the admin area, the REST API or the feeds, because those still live where WordPress lives.

This post separates what changes from what stays exposed when you put an Astro frontend in front of WordPress. It includes a test we ran on XML-RPC, a read-only check you can run on your own site in a few minutes, and the limits of what Hatch Connect 1.1.0, the plugin we make, does and does not do for security. It is written for owners and agencies who have heard the claim and want to judge it.

What the claim gets right

In classic WordPress, every uncached visitor request boots PHP, loads the theme, runs the active plugins and queries the database. An Astro frontend changes that path for visitors. The Astro documentation says that, by default, an Astro site is prerendered and static HTML pages are sent to the browser, with on-demand rendering as an opt-in for routes that need a server (read 28 November 2026).

That is a real change. Theme code and most plugin code no longer run when a reader opens a post, so a flaw in a front-end plugin has less to act on for ordinary visitors. A reader who only reads pages from the frontend never touches your WordPress login form.

Two cautions apply before you treat that as a security guarantee. First, it describes the visitor path, not the whole site. Second, a frontend is itself code. With Hatch the frontend is rendered by a Cloudflare Worker in your own account, so it is not a folder of static files. It is a small application that you now own and keep up to date.

What stays exposed

The Hatch page is direct about this: Hatch does not firewall WordPress, and login, the admin area, the REST API, feeds, sitemaps and previews are not redirected, so those addresses still answer on your server. Only public post and page addresses are sent to the frontend, and only for signed-out visitors. The table lists each door, what Hatch 1.1.0 offers for it, and where we read that.

DoorStill answers on WordPress?What Hatch offers (all optional)Source
Login and admin (/wp-login.php, /wp-admin/)YesLock out repeated wrong passwords (5 failed attempts in 30 minutes by default, counted per IP address); optional Turnstile on sign-in; a reminder to use two-factor sign-in, which needs a two-factor pluginHatch page and security docs
REST API (/wp-json/)YesLock the REST API switch for signed-out visitors; a list of routes the frontend needs stays openSecurity docs
User names in the REST user listYesHide usernames from signed-out visitorsSecurity docs
XML-RPC (/xmlrpc.php)Yes, until closedClose the old remote access; requests are then refused with a 403Hatch page
Feeds, sitemaps, previewsYesNo switchHatch page
Hatch’s own hatch/v1 routesYesSome routes are public on purpose because the frontend reads them; the docs list who can call each oneEndpoint reference
Server details (version, folder listings, headers)YesHide the WordPress version, turn off folder listings, add security headersHatch page

Read the table as a list of jobs, not a list of features. Nothing in it is switched on by installing Hatch. The security docs say nothing is changed until you turn a protection on, and in the screenshot below, taken on a throwaway 1.1.0 site, the Lock the REST API switch is off.

Hatch Connect 1.1.0 Security tab in WordPress with Fortress Mode switched on, showing seven protections, and the Lock the REST API switch still off.
The Hatch 1.1.0 Security tab on a throwaway WordPress site, Fortress Mode on, Lock the REST API off. Screenshot taken 16 November 2026.

The XML-RPC test we ran

XML-RPC is an older remote access endpoint. The Hatch docs say attackers often use it to try many passwords in one request and that most sites do not need it, which is why the switch exists. We wanted to see the switch do its job rather than trust the description.

On 16 November 2026 our Hatch developer installed Hatch Connect 1.1.0 from WordPress.org on a throwaway local WordPress site (WordPress Playground, PHP 8.5), switched Fortress Mode on and requested /xmlrpc.php. A GET request returned 403 Forbidden, a POST request calling system.listMethods returned 403 Forbidden, and the home page carried no X-Pingback header.

The limits of that test matter as much as the result. It was one local site, not a deployed Cloudflare site. It shows that the endpoint was closed with the switch on. It says nothing about how many attacks a real site receives, and it does not test any other door in the table. We have not run a login or REST test of the same kind, so we make no claim about them.

A five-minute exposure check you can run on your own site

This check only asks your site for a few well-known addresses and prints the status codes. It changes nothing. Run it against the address where WordPress itself answers, and run it again after you change any switch. Replace example.com with your own domain.

for p in wp-login.php wp-admin/ xmlrpc.php wp-json/ wp-json/wp/v2/users feed/; do
  printf "%s " "$p"
  curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" "https://example.com/$p"
done

How to read what comes back:

  • 200 on wp-login.php is normal. The login form answers. Decide whether lockouts or Turnstile should sit in front of it.
  • 302 on wp-admin/ to the login page is normal for a signed-out request.
  • 405 on xmlrpc.php means the endpoint is there and answers a GET request with “method not allowed”. 403 is what we saw with the Hatch switch on.
  • 200 on wp-json/ means the REST API is public. That is how a headless frontend reads content, so this is expected unless you lock it.
  • 200 on wp-json/wp/v2/users with a list of accounts means usernames are visible. A 401, 403 or 404 means they are not.

For comparison, we ran the same loop on our own WordPress site, which does not use Hatch, on 28 November 2026. It returned 200 for the login page, 302 for the admin, 405 for XML-RPC, 200 for the REST root and 200 for the feed, and 404 for the user list. That is one site with its own hosting rules, so treat it as an example of the output format and not as a benchmark.

What a new frontend does not change

Moving the visitor path does not move the risk that sits in WordPress itself. Your admin accounts, your plugins and your database are all still on the origin, and the frontend reads from them. The WordPress developer handbook page on hardening WordPress (last updated 14 October 2026, read 28 November 2026) lists the basics, and none of them are replaced by a frontend:

  • Keep WordPress, plugins and themes updated. Older versions are not maintained with security updates.
  • Install plugins and themes only from sources you trust.
  • Keep tested backups and know how to restore them.
  • Lock down file permissions and turn off the built-in code editors.

A frontend also adds credentials of its own. The Hatch frontend reads content through a Subscriber account with an Application Password that you create, not an administrator account, and the Cloudflare API token you paste in is stored encrypted and not shown again, per the Hatch page. Both are things to treat as secrets, to scope narrowly and to revoke when you stop using them. The Hatch documentation explains how to remove the Application Password straight away from your profile page, and the frontend stops working until you deploy again.

There is one more honest limit. Because the frontend is code that runs in your Cloudflare account, it needs its own care: a plugin audit does not cover it. If you also want to know which of your WordPress plugins stop doing their job for visitors, we covered that in Which WordPress Plugins Carry Over to an Astro Frontend and Which You Must Replace.

A fair way to judge the claim

Ask three questions of any “more secure” claim about a new frontend. Which request does it change? Which doors does it leave where they were? Who maintains the new code? For an Astro frontend on WordPress the answers are: the visitor page request; login, admin, REST, feeds and XML-RPC unless you close them; and you or your agency.

Seen that way, the claim becomes “fewer things run on the visitor path, and some doors can be closed on purpose”. That is a narrower claim than “secure”, and it is one you can test with the loop above.

We also do not make any claim about what a frontend does for ranking, speed or uptime in this post. Hatch 1.1.0 is not for members-only content, and WordPress remains the source of every page, so the frontend depends on it for fresh content.

Where Host My Blog fits

We make Hatch Connect, a free WordPress plugin that deploys an Astro frontend to a Cloudflare Worker in your own Cloudflare account, using one API token. You keep writing in WordPress. Version 1.1.0 is released, and Cloudflare is the only deploy target today; other targets are planned, with no date.

For security, Hatch gives you optional switches on WordPress itself: close XML-RPC, hide usernames, lock out repeated wrong passwords, add security headers, hide the WordPress version, turn off folder listings, lock the REST API and add Turnstile on login and comments. It is not a firewall, it does not replace updates or backups, and it makes no security or ranking promise. Test it on a staging site first.

Frequently asked questions

Is a static frontend more secure than WordPress? It changes the visitor path, because pages are served by the frontend instead of PHP. It does not change the login, admin, REST API, feeds or XML-RPC, which still answer on your WordPress server unless you close them.

Does Hatch protect my WordPress login? It offers switches that help, such as lockouts after repeated wrong passwords and an optional Turnstile check, but the login page still answers on your server. Hatch does not firewall WordPress.

How do I check whether XML-RPC is open? Request /xmlrpc.php and read the status code. A 403 means it is refused. A 405 on a GET request means the endpoint exists. In our one local test with the Hatch switch on, both GET and POST returned 403.

Can I hide WordPress completely? Not with Hatch 1.1.0. The login, admin, REST, feeds, sitemaps and previews still answer on your server, so plan for that origin to be public and keep it protected.

Which of these doors does your WordPress answer on today, and which would you close first?

Share
Aditya Sharma
// author
Aditya Sharma

Aditya runs Host My Blog and writes The Cited. Five years in WordPress, most of it spent on what actually makes a blog get found rather than what is supposed to. His attention now goes to how AI answers are changing that, and what a blog has to do to still be the source people land on. Everything he writes about here gets tested on the blogs Host My Blog looks after before it reaches the page.

No comments yet

Be the first to comment.

Write a comment

Leave a comment