How to move a Website from a sub-folder to the base domain on cPanel?

How to move a Website from a sub-folder to the base domain on cPanel?

1- Open your cPanel → File Manager:

2 – Open the public_html directory after entering the File Manager

3 – Open the subfolder that appears within the public_html directory (in our case, xcart).

4 – You should be able to see all the files on your website. If you see a file named index.php or index.html, you’ve come to the right place. By clicking Select All, you can Select all the files and folders.

5 – Right-click one of them and select Move:

6 – Next, specify the location to which the files should be moved. Click on Move Files for your account’s main domain, which is /public_html.

7 – After the files have been moved, return to /public_html and delete any leftover files and folders (in our example, xcart, and the xcart folder).

8 – Finally, access your website in your browser after clearing the cache and check that everything works correctly.

That’s all! You’ve successfully transferred your website from a subfolder to the root domain.