Using the File Manager

Any electronic data when stored eventually ends up as a file. WordPress stores all the content related to your website – users, images, plugins, etc in the form of files. cPanel has a built-in File Manager that enables you to create, copy, move, edit, rename, compress, extract, upload, download, etc files in your account. You can upload files such as images and plugins using this File Manager. In case you are manually installing WordPress, the File Manager can be used to upload the WordPress files. You also have the option of editing files, most commonly used for changing the configuration file i.e. wp-config.php.

Launching the File Manager

To start the File Manager, click File Manager under Files.

Selecting the Directory

On launching the File Manager, the File Manager Directory Selection window appears.

  1. Select one of the four main directories:

    • Home directory (/home/user) – The home directory includes all the files that you have created including folders such as web root, document root, etc.

    • Web root (/public_html/www) – This folder is a soft link to the document root folder.

    • Public FTP root (/public_html/ftp) – This is a sub-folder under home directory that stores files for anonymous FTP users.

    • Document root (/public_html) – This is a subfolder under home directory that holds all the files related to your website. You can choose a domain name from the drop-down menu to view files specific to a certain domain.

  2. Select Show Hidden Files (e.g. .ftpquota, .htpasswds) if you want view the hidden files.

  3. Select Skip this question if you don’t wish to see this directory selection window again.

File Manager Toolbar

The File Manager provides the following functions to manage your files:

  • New File – Creates a new file with a given extension.

  • New Folder – Creates a subfolder in the current directory.

  • Copy – Copies selected items to another directory.

  • Move File – Moves files from one directory to another.

  • Upload – Uploads files to the selected directory.

  • Download – Downloads selected files to your computer.

  • Delete – Deletes selected items from the server.

  • Rename – Renames selected items.

  • Edit – Opens the selected file in a text editor.

  • Code Editor – Opens the selected source file in a code editor.

  • HTML Editor – Opens the selected HTML file in a HTML editor.

  • Change Permissions – Changes the read, write, and execution permissions for the files.

  • View – Opens the selected file for viewing.

  • Extract – Extracts the selected *.zip, *.Gz, or *.Bz2 archive and stores the files in a directory.

  • Compress – Compresses the selected files into a single *.zip, *.Gz, or *.Bz2 archive.

Use Case 1 – Uploading files using File Manager

You can add files to your directory using the Upload function. cPanel s only supports an upload of up to one file at a time. To upload multiple files, compress the set into an archive (*.zip, *.Gz, or *.Bz2) and then proceed with upload.

To upload files:

    1. Click Upload.

    1. Select the file for upload.

    1. Click Open. The file is uploaded to the folder.

    2. In case of an archive, you can extract the files to a specified located using the Extract function.

  1. Enter the destination folder and click Extract Files(s).

Directory Structure

Navigation Toolbar

A Navigation Toolbar is available for you to navigate between the folders.

  • Home – Takes you to the home directory (/home/user).

  • Up One Level – Takes you one level higher in the directory structure.

  • Back – Takes you back to the folder that you previously viewed.

  • Forward – Takes you forward to the next folder that you viewed, before Back.

  • Reload – Refreshes the list of files and folders.

  • Select all – Selects all the displayed files and folders.

  • Unselect all – Deselects all the displayed files and folders.

The File Window

The File Windows spans across a major portion of your screen. It lists the contents of a given directory along with details such as:

  • Name – Name of the file.

  • Size – Size of the file, displayed in bytes, KB, etc.

  • Last Modified – Date and time when the file was last modified.

  • Type – Type of the file. E.g. text/plain for plain text files, /text/html for HTML files.

  • Perms – Read, write, and execution permissions associated with the file. E.g. 0644

File and Folder Operations

You can right-click on a specific file or folder to view the list of operations that you can perform on it. As you can see, the list of operations for files differs from that of a folder.

The following list gives you a brief overview of each operation:

  • Download – Download the selected file to your computer.

  • View – Open the selected file for viewing.

  • Edit – Open the selected file in a text editor.

  • Code Edit – Open the source file in a code editor.

  • HTML Edit – Open the HTML code in a HTML editor.

  • Move – Move the selected item to another folder.

  • Copy – Copy the selected item to a specified folder.

  • Rename – Rename the selected item.

  • Change Permissions – Change the read, write, and execution permissions for the selected item.

  • Delete – Delete the selected item from the server.

  • Compress – Compress the selected item into a *.zip, *.Gz, or *.Bz2 archive.

  • Extract – Extract the files from the selected *.zip, *.Gz, or *.Bz2 archive.

  • Password Protect – Allows you to set a username and password for the selected folder.

  • Leech Protect – Allows you to prevent users from sharing passwords to a restricted area of your website. If the number of logins within a 2 hour period exceeds a specified number, the users are redirected to a given URL. You may also choose set up an email alert when such an event occurs. Additionally, you also have the option of disabling such compromised accounts.

  • Manage Indices – Allows you to customize the way in which a directory will be viewed on the web. You can choose default setting, standard indexing (filename only), or fancy indexing (filename and description). You also have a no indexing option if you want to hide the files in a given directory.

Use Case 2 – Editing the configuration file wp-config.php

You can use the Edit or the Code Edit file operation to modify the configuration file. A code editor is more intelligent in comparison as it supports advance features such as syntax highlighting, auto-complete, etc.

To edit the configuration file:

    1. Open the file in the Code Editor.

    1. Choose the character encoding. Unless you know what you are doing, it is recommended that you use the default value i.e. utf-8. Click Edit.

  1. Make appropriate changes to the file using the editor and click Save Changes.
Would love your thoughts, please comment.x