Skip to content
Technology for businesses since 2008

Help center · Domains and cPanel

How to use cPanel's File Manager

File Manager is cPanel’s tool for viewing and editing your site’s files right in your browser, with no extra program needed. To open it, log in to cPanel and click File Manager, in the Files section. The main site’s files are in the public_html folder: everything inside it is what people see when they open your domain.

This article shows you how to get around the folders, upload files, compress and extract a .zip, edit a file, show hidden files such as .htaccess, and, before anything else, save a copy so you can undo any mistake. cPanel menu and button names change depending on the panel version and theme, so if something is in a different place on your screen, look for the equivalent name.

Where the folders are

When you open File Manager, you start in the account’s home folder, usually shown as /home/yourusername. Inside it are the most-used folders:

Folder What it’s for
public_html Files for the main domain. This is what visitors see.
Addon domain or subdomain folder Each one has its own folder, set when it was created. It can sit inside public_html or beside it, depending on what was chosen.
mail Data for the email accounts. Don’t touch it without a reason.
tmp, logs, and others Temporary files and account logs.

To find out which folder belongs to which domain, open Domains in cPanel and check the Document Root column. The article on how to create a subdomain in cPanel shows where that folder is set, and the one on addon domains follows the same logic.

Before you change anything: download a copy

Deleting or editing the wrong file can take the site down. Before any change:

  1. Right-click the file (or folder) and choose Compress.
  2. Once the .zip is generated, click it and use Download to save a copy to your computer.
  3. For a single file you’re going to edit, just use Download on that file itself.

For a full copy of the site, also use the automatic backup: MigraCloud uses JetBackup, and you restore it yourself. See backup in cPanel with JetBackup.

Upload files

  1. In File Manager, open the destination folder, such as public_html.
  2. Click Upload in the top bar.
  3. Drag the files into the window or click Select File.
  4. Wait for the progress bar to finish, then return to the folder with the Go back to… link.

For a site with many files, compress everything into a .zip on your computer, upload just that file, and extract it on the server. That’s much faster than uploading file by file. If the upload fails because of size, the limit depends on the server and your plan: ask support through the contact page. For large volumes, FTP with FileZilla is usually more stable.

Compress and extract .zip files

To extract:

  1. Upload the .zip to the folder where the files should go.
  2. Click the file and choose Extract in the top bar (or right-click it and choose Extract).
  3. Confirm the destination folder and click Extract File(s).
  4. Check the result. If the .zip created an extra folder inside the folder, move the contents up one level, so that index.php or index.html sits directly at the root of the site.
  5. Delete the .zip after checking, so you don’t leave a large (and public) file behind.

To compress: select the files or folders, click Compress, choose Zip Archive, and confirm the name.

Attention: extracting over an existing folder overwrites files with the same name. That’s why the copy from the previous step matters.

Edit a file

  1. Click the file (for example wp-config.php or a .css file).
  2. Choose Edit (or Code Editor, for syntax highlighting).
  3. If a warning about encoding appears, keep UTF-8.
  4. Make your change and click Save Changes.
  5. Open the site in a private (incognito) window to check it. If something broke, restore from the copy you downloaded.

Change only what’s necessary, one thing at a time. A misplaced semicolon or quotation mark in a PHP file can cause the 500 error or white screen on WordPress.

Show hidden files, such as .htaccess

Files that start with a dot, such as .htaccess, are hidden by default. To see them:

  1. In the top right corner of File Manager, click Settings.
  2. Check Show Hidden Files (dotfiles).
  3. Click Save.

The .htaccess file holds server rules, such as redirects and WordPress permalinks. Always download a copy before editing it: a mistake there can take the site down. To understand its default content, see WordPress .htaccess: how to find and create the default file.

General permissions

Each file and folder has a permission, a number that says who can read, write, and run it. To view or change it, right-click and choose Change Permissions. In general terms, folders use 755 and files use 644, and 777 should be avoided. The full topic, with values for WordPress, is covered in file permissions in cPanel.

Precautions that prevent headaches

  • Don’t delete public_html, nor the folders of addon domains and subdomains. If the site disappeared, restore it from a backup.
  • Watch out for the trash. File Manager may have a move-to-trash option: check the box when deleting, and if needed, restore from Trash.
  • Don’t leave backup files or .zip files containing passwords and data inside public_html: anyone who knows the address can download them.
  • Use the site’s own tools. If you use WordPress, plugins and themes install from the WordPress dashboard itself, with no need for File Manager.

Frequently asked questions

Does File Manager replace FTP?

For quick tasks, yes. For uploading many files or syncing folders, FTP is usually more practical.

What’s the maximum file size I can upload?

It depends on the server configuration and your plan. Ask support through the contact page.

I deleted a file by mistake. How do I recover it?

First check File Manager’s Trash. If the file isn’t there, restore the file or folder with JetBackup, as explained in the article on backup in cPanel with JetBackup.

I can’t find .htaccess. Does it not exist?

It’s probably just hidden. Turn on Show Hidden Files in Settings. If it still doesn’t appear, the file may really not exist in that folder, and WordPress recreates it when you save the permalinks.

Can I touch the mail folder or files I don’t recognize?

Avoid it. If you don’t know what a file is for, leave it as it is and ask support before deleting anything.

More on Domains and cPanel

See all →

Help center

Looking for something else?

See all tutorials, organized by topic.