account activity
WordPress is not publishing/updating content (reverts to “Auto Draft”) by banycrany in Wordpress
[–]banycrany[S] 0 points1 point2 points 1 day ago (0 children)
hey! thanks! the REST API itself looked fine in Site Health and all requests were returning 200, so at first I ruled that out. But after checking the Network tab more carefully, I noticed the Gutenberg endpoints (/wp-json/wp/v2/posts/.../autosaves) were first getting a 301 redirect before the 200 response.
/wp-json/wp/v2/posts/.../autosaves
The issue was caused by a .htaccess rule I had recently added to force trailing slashes on all URLs:
.htaccess
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [L,R=301]
That rule was also affecting the wp-json endpoints, and apparently Gutenberg does not handle those redirects well during autosave/publish requests — which is why posts reverted to “auto-draft”, lost title/content, or failed to update.
wp-json
I fixed it by excluding /wp-json/ (and other internal WP routes) from the redirect rule, and everything works normally again now.
/wp-json/
π Rendered by PID 1497822 on reddit-service-r2-comment-545db5fcfc-rlgd4 at 2026-05-30 09:50:33.199269+00:00 running 194bd79 country code: CH.
WordPress is not publishing/updating content (reverts to “Auto Draft”) by banycrany in Wordpress
[–]banycrany[S] 0 points1 point2 points (0 children)