An advanced guide on how to setup a React and PHP

A quick guide on setting up a React and PHP web. I love React and I still use PHP

Davison Pro
5 min readJan 9, 2019

I have just launched DavisonPro.dev. A standalone blog where I write about Javascript, Web development and software development.

In this article, I am going to walk you through setting up a PHP backend server for a React Application.

To download or browse the code visit the repository via this Github link.

With this setup you will be able to run and develop your React app on your normal Apache localhost rather than node js localhost:3000 which is crazy when you wan’t to force authentication redirects with PHP or using secure cookie as you develop your web app or render some things with PHP before your app starts. I will also add SCSS support and nice advanced stuff.

Alright, now let's get to it!

Requirements: You need Node.js and npm installed on your local machine. As well as a XAMPP, WAMP or any other web server solution.

Setting up the folder structure

Here is the folder structure we will be left with after the dust settles:

--

--