• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Headless Wordpress and React App on same server - how?

flo

New Pleskian
I am pretty new in website and server stuff and i have a question:

I have an react app and it should be the main and only website I want to reach under www.example.com, and I want to use Wordpress just headless but on the same server. Server is managed by Plesk.

As far as I understood, Wordpress has to be installed in my servers document root, e.g. /httpdocs/.

But when I want to reach my react app under www.example.com, I have to deploy the build folder content also into /httpdocs/, which interfers with wordpress. In this case if I go to www.example.com, I get the wordpress site.

When I have my react app in another folder, e.g. /github/build/, and set this folder my document root, the page is accessible under www.example.com, but wordpress is not reachable anymore (www.example.com/wp-login.php not found).

The only ugly way it seems for me it can work is if I deploy the build folder into the wordpress root directory, but then the react app is only acessible under www.example.com/build (only guessing).

Is there a way to make it work as wanted?
 
I set the thread to resolved because the solution is simply to install wordpress in a sub folder, e.g. example.com/wp.
 
Back
Top