Hosting and cPanel

cPanel File Manager

Reviewed on 6 min read files cPanel

cPanel's File Manager lets you manage all the files and folders in your account from the browser: from the basics (create, edit, delete) to compressing, extracting, moving in bulk, copying or changing permissions.

cPanel File Manager

The main domain's website is in public_html. Other domains may be in other folders: you can see this in cPanel's Domains section.

Basic actions

Browse, create, rename and delete

The screen has three areas: the action bar at the top, the folder tree on the left and the listing of the folder you are in.

  • + File and + Folder create a new file or folder in the current folder.
  • Rename renames the selected item. Quicker: double-click the name.
  • Delete sends it to the trash.

Renaming a file by double-clicking its name

If you're not sure which folder you are in, look at the path in the navigation bar:

Path of the current folder in File Manager

Edit a file

Select the file and click Edit. It is a simple code editor, handy for quick changes to PHP, JS, CSS, .htaccess files, etc. Before changing anything important, download a copy of the file in case you need to go back.

If it asks about the encoding when you open it, keep the one it suggests (usually utf-8). If you see odd characters, close without saving.

Context menu

Right-clicking any file or folder gives you the most used options to hand: download, edit, move, copy, rename, permissions, compress...

Right-click context menu in File Manager

Upload and download

Upload opens a window where you can choose several files from your computer or drag them in. They are uploaded to the folder you were in when you clicked Upload. If they already exist, tick Overwrite existing files to replace them.

To upload a whole folder or lots of files, upload them in a ZIP and extract them on the server: we explain it in upload multiple files and directories.

Download downloads the selected file. To download lots of files or a folder, compress them first (see below) and download the ZIP. Afterwards, delete the ZIP from the server if it was in public_html: anyone who guesses its name could download it.

Search for files and folders

The search box is at the top right. Choose where to search (the whole account, public_html or the current folder) and type part of the name: mail will find everything with that text in its name. Double-click a result to go to its folder.

It searches by file name, not inside the file contents.

Advanced actions

Compress and extract

To compress, select what you want to include (with Select All, or by clicking with Ctrl on Windows or Cmd on macOS) and click Compress. Choose the format (ZIP is the most convenient) and the file name.

Selecting several files and compressing them into a ZIP

Extract decompresses a file into the folder you choose. A typical example: you have built a static website on your computer, you create a ZIP with everything (HTML, JS, CSS, images), upload it, extract it into public_html and the website is live straight away.

Permissions (chmod)

chmod permissions define who can read, write or execute each file.

Select one or more files or folders and click Permissions to tick them in a wizard. You can also click a file's Permissions column and type the number directly.

The norm is 755 for folders and 644 for files: websites and applications work with that. Don't use 777: it isn't needed and it is insecure.

Copy and move

Select what you want to copy and click Copy (or use the context menu). It will ask you for the destination folder, for example /public_html/nueva; the folder must exist.

Move works the same way. You can also drag the files onto the folder in the tree on the left:

Moving files by dragging them to another folder in File Manager

If you move a website's files, check afterwards that it still works: the application may depend on that path.

Show hidden files

Hidden files are the ones whose names start with a dot. Many belong to the system, but they include your website's .htaccess and the .env configuration file of some applications.

To see them, click Settings at the top right and turn on Show Hidden Files (dotfiles). In the same panel you can choose the folder that opens when you enter File Manager.

Trash

Whatever you delete goes to the trash. To see it, click View Trash; to recover something, select it and click Restore: it goes back to its original folder.

The trash takes up space on your hosting, so empty it from time to time with Empty Trash. Once emptied, items can no longer be recovered from here; only from a backup.

Folders you shouldn't delete

When cleaning up the account, don't delete the folders that come by default: they are needed for the hosting to work. For example, mail and etc hold the mailboxes and the email configuration, .cpanel the panel's data and logs the access logs. You will find the list in essential cPanel directories. If you're unsure what a folder is for, ask us before deleting it.

You may also find useful

Something wrong or out of date? Tell us and we will review it.