How to upload a React app to Cpanel: Many people have been asking me on how I put my website online every time. It is simple, I just need to use the cpanel and upload it in it. However, uploading my site each time is very boring. To make sure I don’t stress myself, I decided to create a github repo that can provide me direct shortcut to deploying my website using the Cpanel. After creation, I started sharing it with other people so that they won’t need to suffer from creating their own github repos.
Upload React App To Cpanel
A React app is a JavaScript application that runs in a browser. It can be run from any web server, but when we add a node.js server to the mix, we get many advantages.
In this guide, we’ll see how to use CPanel with Node.js and Nginx to create an awesome web application stack. We’ll also learn how to deploy your React app to production using Cloudways!
The best part of using Cloudways is that it takes care of everything related to the hosting — including the setup of your server, installing the required software packages, security settings etc., so you don’t have to worry about anything!
The process for uploading your React app to cpanel is pretty similar to the process of building it. It differs in that you will be using Git to clone a repo from GitHub, instead of using npm to install packages.
In order to get started, make sure you have git installed on your local machine. Once you have done this, open up your terminal and navigate to the directory where you want the project directory to live. Then run the following command:
git clone https://github.com/reactjs/react-app-template.git react_app
How to Upload React App to Cpanel:
1. Open your cPanel account.
2. Go to the Files section, and click on File Manager.
3. On the left hand side of your screen, you will see a list of folders and files in your account. Click on Public_html folder.
4. Create a new folder in public_html directory by clicking on Create New Folder button (as shown below). Name this folder as react-app.