Ahosting Logo
Knowledge Base

How to Use File Manager in cPanel

File Manager is cPanel's built-in way to browse, upload, edit and move the files that make up your website. It needs no software installed and no FTP client configured, which makes it the fastest route for small jobs: editing one configuration line, uploading a file, or finding out where all your disk space went.

For moving thousands of files it is the wrong tool. That is what FTP is for. For everything else it is usually quicker than opening anything else.

The directory that matters

Open File Manager from cPanel and you land in your home directory. This is not your website.

Your website is public_html. Files inside it are served to the internet; files beside it are not. That single distinction explains most beginner confusion in cPanel, and it works in both directions.

A file uploaded to the home directory instead of public_html will never appear on the site, no matter how correct it is. And a database export or a backup archive left inside public_html can be downloaded by anyone who guesses the filename, which is why intermediate files belong above it, not in it.

Set File Manager to open directly in public_html in its settings if that is where you always work.

The one rule that explains most File Manager confusionThe home directory· mail, logs, private files, backups· not reachable from the internet· a file uploaded here is not on your websitepublic_html, inside it· the website files· everything here is served publicly· a file uploaded here is live immediatelyThe other beginner trapFiles beginning with a dot are hidden until you turn on the setting for them, and .htaccess isthe file people cannot find.

Show hidden files first

Files whose names begin with a dot are hidden by default, and the two you are most likely to need, .htaccess and .user.ini, are both in that category.

Open Settings in the top right and enable Show Hidden Files. Without it, people conclude .htaccess does not exist, create a second one, and end up with two files where the one they cannot see is the one taking effect.

Uploading

Navigate to the destination first, then click Upload. Files land wherever you were standing, and uploading to the wrong directory is the most common mistake here.

For anything large, upload a ZIP and extract it on the server rather than sending thousands of individual files. It is dramatically faster and avoids transfers that silently drop a file or two. Right-click the archive and choose Extract.

If an upload fails on a large file, the limit is a PHP setting rather than File Manager: configuring PHP settings in cPanel goes into upload_max_filesize and the post_max_size that has to accompany it.

Editing files

Select a file and choose Edit for plain editing, or Code Edit for syntax highlighting. Code Edit is worth using for anything with brackets.

Before editing wp-config.php or .htaccess, copy the file first. Right-click, Copy, and give it a name like .htaccess-backup. A mistake in either takes the whole site down, and having the original beside it turns a crisis into a thirty-second fix.

Watch for stray whitespace in PHP files. A space before the opening <?php produces a "headers already sent" warning that looks far more serious than it is.

Finding where the disk went

When an account is near its quota, File Manager's disk usage view breaks the space down by directory, which is much faster than guessing.

Four things account for most of it. Backup plugins writing into the account and never cleaning up: often tens of gigabytes nobody knew about. Log files growing without limit. Email accumulated over years. And media uploaded at original camera resolution.

Only the last is genuine growth. The others are waste, and clearing them is a permanent fix instead of a postponement.

Note that File Manager does not count email, and cPanel's own disk figure can lag by a few minutes after a large deletion.

Permissions

Right-click a file and choose Change Permissions to see the numbers.

Files should be 644 and directories 755. That is correct for a normal site, and you rarely need to touch it.

Never set anything to 777. It appears in a lot of old forum advice as a fix for upload problems and it makes the file writable by anyone on the server. If uploads genuinely fail with a permissions error, the cause is ownership rather than permissions, and the right move is a support ticket instead of a workaround that converts an inconvenience into a compromise.

Deleting

Deleted items move to a trash folder by default, which still consumes your disk quota. If you are clearing space, empty the trash afterwards or nothing is actually recovered.

Hold the delete option that skips trash only when you are certain. There is no recovery beyond your own backups.

When to use FTP instead

File Manager is a browser interface, and it shows its limits on volume. Moving a whole site, syncing a local folder, or working with thousands of files is what an FTP client is built for; it resumes interrupted transfers, which File Manager does not.

Managing FTP accounts in cPanel goes into setting one up, including how to give a contractor access to one directory instead of the whole account.

If you would rather work in Finder or Explorer than in a browser, the account can be mounted as a drive. How to Use Web Disk and WebDAV in cPanel explains setting that up and where it is the wrong tool.

The most useful thing to do with these tools is make a copy of the site to test on. How to Make a Development Copy of a Site in cPanel goes into the four steps and the one that gets missed.

Watch these steps on screen 1 clip · 0:48

Recorded on a real panel, no narration, captions on screen. Opens here without leaving the page and without an account. Every name, address and figure shown is made up for the recording.