How to Access and Edit Your Site Files via cPanel

Share this:

The cPanel File Manager tool allows you to view, access, modify, add and delete files from within the cPanel interface. This gives you a “one-stop” editing and management solution for your entire site that bypasses the need for an FTP client. Follow these steps to get started with the cPanel File Manager.

Starting the File Manager

Being by logging in to your hosting account and navigating to the cPanel dashboard or logging directly into cPanel. Scroll down until you come to the “Files” or “File Management” section; the label may differ depending on your host’s cPanel setup.

Click on the File Manager icon to open the file management tool.

635712641803633471

This brings up a directory selection popup box that asks which directory you would like to access. For most editing purposes, you’ll need to be in the Web Root directory where the public_html folder is housed. All public files, including everything that users see when they visit your website, are stored in this folder.

635712644963032469

Click the checkbox next to “Show hidden files” to display all file types when the File Manager opens so that you can edit files such as .htaccess. You can also tell cPanel not to bring up this dialogue in the future by checking the box that sets Web Root as your default directory. If you’re not sure whether or not you want to turn off the dialog box, leave this option unchecked.

635712645789867413

Click the “Go” button to launch the File Manager.

Working With Files

The File Manager screen has three sections: a top toolbar, a sidebar and a main file list. The toolbar has everything that you need to create new files and folders, upload or download files, copy files, move files and delete files. You can also rename, edit and view files using this toolbar.

635712647371549892

The sidebar displays the current directory at the top in a box next to a small picture of a house that denotes which subdirectory you’re working in. It should say “public_html,” and the same folder should be highlighted in the directory listing below the box.

635712648289111753

To the right of the sidebar, you’ll see a complete list of all of your files along with options for navigating through the various directories.

635712648882872840

Each file is labeled with an icon specific to its file type. HTML files are denoted with symbol that looks like a piece of paper with a globe on top. Text files use a paper symbol with a red T on it. Images are represented by a screen icon, and folders are rendered in blue. This makes it easy to tell file types apart at a glance.

635712650587062003

Editing Files

The editor is where you can change the contents of files within your website. Highlight the file that you want to edit and click “Code Editor.”

635712662322593459

This brings up the editing screen where you can toggle between editing the code and editing the text of the file. Code editing mode features numbered lines and color coding to help you visualize blocks of code when working on large files. As you edit in this mode, the line you’re working on is highlighted to make it easier to keep track of what you’re doing. The text editor simply displays a plain text version of the file contents.

635712663441254910

After making changes, hit the “Save” button. A notification that the changes were successful should pop up in the lower right corner of the screen.

635712664801542489

When you’re done with editing, close the editor to return to the File Manager.

Deleting Files

To remove files that you no longer need or want, highlight the file and click the “Delete” button.

635712665135488022

A confirmation box will pop up asking if you’re sure you want to delete the file. Before agreeing, make sure that there are no live links to it and that deleting it won’t negatively affect the functioning of your site. Then click Delete File(s) to remove it from the directory.

635712665998675564

Whether you’re making small tweaks to one or two files or are interested in coding your whole website from the ground up, the File Manager in cPanel delivers the power that you need through a simple, user-friendly interface.

Comments

comments