cPanel File Manager is a powerful tool that allows you to manage your website files directly from your browser. It provides a user-friendly interface for uploading, editing, and organising files, making it an essential feature for website owners. Whether you need to upload new content, edit existing files, or manage your site's structure, cPanel File Manager offers a comprehensive solution.
In this guide
Directory structure
Understanding the directory structure in cPanel is crucial for efficient file management. The public_html directory is the root folder for your website, where all publicly accessible files are stored. This is the directory where your main website files, such as HTML, CSS, and JavaScript, are placed. Within this directory, you might find folders such as wp-content, which contains themes and plugins for WordPress sites. This directory is vital for WordPress users as it holds the customisations and additional functionalities of your site. The mail directory stores email data, which is essential for managing your webmail accounts and ensuring proper email functionality. The logs directory holds access and error logs, providing valuable insights into your site's performance, such as identifying errors or monitoring visitor activity. Additionally, the tmp directory is used for temporary files, which can include session data or cached content. Familiarising yourself with these directories will help you navigate and manage your files more effectively, ensuring that your website runs smoothly and efficiently.
Uploading files
Uploading files to your website is straightforward with cPanel File Manager. To upload files, navigate to the desired directory and click the Upload button in the toolbar. This will open a new tab where you can select files from your local system to upload. You can also drag and drop files directly into the File Manager window, which is a quick and intuitive method. Be mindful of file size limits, as large files may require alternative methods. For instance, many hosting providers set a maximum upload size limit for web-based uploads, which can be a few megabytes. For extensive file transfers, consider using FTP or SFTP for a more efficient process. These protocols are designed for transferring large files and directories, providing a more stable and reliable transfer process. Always ensure that you upload files to the correct directory to avoid disrupting your site's structure and functionality.
Extracting ZIP archives
Extracting ZIP archives is a convenient way to upload multiple files at once. First, upload the ZIP file to the desired directory using the upload method described earlier. Once uploaded, right-click on the file and select Extract. This action will open a dialog box where you can choose the directory in which to extract the files. This method is the fastest for deploying full website content, as it reduces the need for individual file uploads. It is particularly useful for installing software packages or website templates that are distributed as ZIP files. Ensure the extracted files are in the correct directory to maintain your site's structure. For example, if you are uploading a WordPress theme, it should be extracted into the wp-content/themes directory. Always double-check the extracted files to ensure that no files are missing or misplaced, which could cause errors or broken links on your site.
Editing files
Editing files directly in cPanel File Manager is simple. Locate the file you wish to edit, right-click, and choose Edit. This will open the file in a new tab with a text editor interface, allowing you to make changes directly within your browser. This feature supports various file types, including HTML, CSS, PHP, and text files. After making your changes, remember to save them to ensure they are applied. The built-in editor also provides syntax highlighting for many programming languages, which can help you identify errors or typos more easily. Editing files directly in File Manager is a quick way to implement updates without needing additional software, such as an FTP client or a dedicated code editor. However, always back up files before making significant changes, as incorrect edits can lead to site errors or downtime. Consider using version control systems for larger projects to track changes and revert to previous versions if necessary.
Hidden files
Some important files, like .htaccess, are hidden by default in cPanel File Manager. These files often contain configuration settings that are critical for your website's operation, such as URL redirects or access controls. To view these files, click the Settings button in the top-right corner of the File Manager interface and check the Show Hidden Files option. This action will display files that begin with a dot, which are typically configuration files critical to your site's operation. Always handle hidden files with care, as they can significantly impact your site's functionality if altered incorrectly. For instance, incorrect changes to the .htaccess file can result in server errors or security vulnerabilities. It is advisable to create a backup of these files before making any modifications, and consult documentation or support resources if you are unsure about the changes you intend to make.
File permissions
File permissions determine who can read, write, or execute a file. They are represented by a three-digit number, with each digit indicating permissions for the owner, group, and others, respectively. Common permission settings include 755 for directories and 644 for files, ensuring both security and functionality. To change permissions, right-click the file or directory and select Change Permissions. A dialog box will appear where you can adjust the permissions by checking or unchecking boxes corresponding to read, write, and execute permissions for each user category. Avoid setting permissions to 777, as this can create security vulnerabilities by allowing anyone to modify or execute files. Instead, adhere to the principle of least privilege, granting the minimum permissions necessary for functionality. Regularly review and audit file permissions to maintain security, especially when installing new software or plugins that may alter permissions.
Troubleshooting
If you encounter issues such as being unable to edit files, upload failures, or hidden files not displaying, several troubleshooting steps can help. Ensure you have the correct permissions to edit or upload files, as insufficient permissions can prevent these actions. If uploads fail, check for file size limits or consider using FTP for larger files, as mentioned earlier. For hidden files, verify that the Show Hidden Files option is enabled in settings. Additionally, clear your browser cache or try accessing the File Manager from a different browser to rule out browser-specific issues. If problems persist, consult your hosting provider's support for assistance, as they may have specific configurations or restrictions in place. Maintaining an up-to-date backup of your site can also be a crucial step in troubleshooting, allowing you to restore functionality quickly if an issue arises.
For the complete File Manager reference, see the cPanel File Manager documentation.
Related guides
- Getting Started with Your GHost Cloud Hosting Account
- How to Install WordPress on GHost Cloud
- How to Back Up and Restore Your WordPress Site
- cPanel Overview - A Complete Beginner's Guide
- How to Create and Manage MySQL Databases in cPanel
To explore more about our hosting solutions and how they can benefit your website, visit our Shared Hosting page. For further assistance, reach out via our support ticket system or contact form.
