Upload, edit, or recover a website file in the document root for the correct domain.
Before you start
Identify the intended domain’s document root under Domains. Download a copy before overwriting any file.
What to do
- In cPanel open File Manager and navigate to the domain’s document root. The primary site often uses
public_html; other sites may not. - Use the File Manager toolbar to upload a file or create a folder. To change an existing file, select it and open the editor.
- To edit a dotfile such as
.htaccess, enable Show Hidden Files in File Manager settings. Make a separate backup and change only the intended lines. - Save, then check the affected public page. Restore the prior copy if the change produces an error.
Check that it worked
Open the intended URL in a private browser window to make sure the right site and file were updated.
If it does not work
If you see a 403 or 500, check that you are working in the right directory, then restore the last working file and note the exact error for support.