This guide explains how you can change the web root of your web application. Any custom web root folder must be within public_html.
How to Change the Web Root of an Application
Step 1: Go to Application Management
Log into the Cloudways Platform with your credentials. Click on Applications in the top menu bar and then select your target application from the list.
Step 2: Change the Web Root
As explained, the new web root must be within the public_html folder. In this example, we have created a directory called web under public_html through SSH. To set this folder as the new web root, we simply type it in the Webroot field as seen below.
Once this has been done, the web server will start serving files from this new location.
Please make sure that the custom web root you created contains the necessary web files (index.php or index.html …) or your website will not work.
In case if intended new webroot doesn’t exist in public_html, the process will create automatically.