The web root is the main directory from where your application’s public files are served to visitors.
In some cases, you may need to change the default web root, especially when your application uses a custom folder structure or requires a specific public directory to load correctly.
This guide explains how to change the web root of your application from the Cloudways Platform so your website points to the correct directory and functions as expected.
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 Flexible in the side menu bar and then click on My Applications.
Click on your desired Application as shown below.
Step #2 - Change the Web Root
Now in the Application Management page, click on Application settings as shown below.
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.
Important:
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.
That’s it! We hope this article was helpful.
Need Help?
If you need assistance, feel free to:
Visit the Cloudways Support Center
Chat with us: Need a Hand > Send us a Message
Or create a support ticket anytime.
We're here 24/7 to help you!



