Hey everyone,
I'm setting up a fresh WordPress site with the Twenty Twenty-Five theme and I'm stuck on publishing a page. Hoping someone here has run into this before and can point me in the right direction.
The setup:
Fresh WordPress install, Twenty Twenty-Five theme
Creating a new page, selecting a pattern (following the official tutorial)
Clicking "Publish" gives me:
Publishing failed. Could not update post in the database.
Are you ready to publish? Double-check your settings before publishing.
In the browser console (F12 → Network), the actual culprit is an HTTP 500 Internal Server Error.
Affected URL (anonymized): https://my-site.com/wp-admin/post.php?post=XXX&action=edit
What I've already tried / ruled out:
Permalinks reset (Settings → Permalinks → "Post name" → save). No change.
All plugins disabled temporarily. Error persists – so it's not a plugin conflict.
Site Health: No critical issues, only 5 "recommended improvements" (inactive plugins/themes, missing opcode cache, no page cache detected, server response time OK). The REST API is not flagged as broken there.
It's a brand-new, empty page using a default pattern – no legacy content, nothing exotic.
My suspicion:
Since everything on the WordPress side looks clean, I'm leaning toward a server-side issue. The 500 hits exactly when the editor tries to write the page to the database via the REST API (/wp-json/...).
Questions for the hive mind:
Has anyone seen this behavior with Twenty Twenty-Five (or Block Editor + patterns in general)? What was the root cause?
Which server-side settings should I check first? I'm thinking:
PHP error log / debug.log
Firewall / ModSecurity / WAF blocking POST requests to /wp-json/
Cloudflare (if in front) – Bot Fight Mode / security rules
WP_MEMORY_LIMIT / max_execution_time
Database charset (collation) – utf8mb4 vs. utf8
Is there a way to export the Site Health report (e.g. as a file) to hand off to the host/admin? I've only found the dashboard view so far.
Any known workaround to publish the page in the meantime (e.g. Classic Editor as a stopgap)? I know that's just a band-aid, not a fix.
I've already reached out to the backend/server admin to check logs and the firewall. But if anyone here has hit this exact error, I'd love to hear what solved it.
Thanks in advance!
UPDATE: Blank page also fails with 500 – so it's not the pattern
Hey everyone, thanks for the quick replies – all three were genuinely helpful. Quick update since a few people asked for follow-up:
What I tested based on your suggestions:
Blank-page test (u/CombinationParty7358 – the first reply): Tried publishing a completely empty page, no pattern, no content. Same 500 error. So it's not weird Unicode characters in the pattern – it's something more fundamental in the write path. Good call, that narrowed it down a lot.
debug.log before ModSecurity (u/Jealous-Machine-5192
Took your advice and prioritized the PHP log over the ModSec rabbit hole. I've asked the server admin to pull wp-content/debug.log and the PHP error log around the timestamp of the failed publish. Will update once I have the output.
DB charset (u/ – answer b): This is now my top suspect given the blank-page result. Asked the admin to verify:
define('DB_CHARSET', 'utf8mb4'); in wp-config.php
tables actually on utf8mb4_general_ci / utf8mb4_unicode_ci (not just utf8)
Will report back if that's the culprit – your "exact same thing last month" story is very much on my mind.
Site Health export: Found it – Tools → Site Health → Info gives the raw dump to copy. No export button, as you said. Thanks for the pointer.
Classic Editor workaround: Keeping it in my back pocket. If we need the page live short-term, I'll activate it as a stopgap – but I'd rather fix the real cause first.
Current status: Waiting on the server admin's log output. The blank-page result makes me lean even more toward a server-side write/permission/DB issue rather than anything content-related. Will post the final solution here once we've nailed it – so the next person with this error has a reference.
Thanks again, this sub is great.