WordPress as a CMS – best way to decouple publishing/front-end

To disable WP frontend and WP REST API output, create an empty theme, i.e. ‘My Empty Theme’ in /wp-content/themes/myemptytheme/, that contains 3 files: style.css index.php functions.php style.css may contain the theme name only: /* Theme Name: My Empty Theme */ index.php – leave it empty functions.php – include the following code to disable REST API … Read more

Only expose routes with prefix /wp-json on WordPress using Apache

Try the following mod_rewrite directives instead at the top of your root .htaccess file (before the # BEGIN WordPress section): # Reject any user requests that are not prefixed “/wp-json” RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule !wp-json($|/) – [F] Requested URLs that are not prefixed /wp-json (or /wp-json/) are rejected with a 403 Forbidden. The RewriteCond directive … Read more

Headless WordPress – Issue with plugin path

I understand the question and answer are from more than a year ago, but I just wanted to add some additional information in hopes it might be useful for future visitors of this Question. Recently, while setting up a Headless WordPress CMS with Roots Bedrock, I came across the same issue and solved it with … Read more

Can part of my WordPress website be headless?

You can mount a react or a vue app partially into a page, so what you ask is theoretically possible but probably not the best solution. You may consider expanding the react application a bit and go fully headless. In this case, next.js (based on react) might be a better solution as it will allow … Read more