Cloud Service >> Knowledgebase >> cPanel >> Learn to Create a New File Using the cPanel File Manager
submit query

Cut Hosting Costs! Submit Query Today!

Learn to Create a New File Using the cPanel File Manager

Managing files on your website is an essential task for any website owner or server administrator. One of the most convenient tools available for this purpose is cPanel, which is commonly used in hosting environments. With cPanel, you can easily create, upload, and manage files without needing to use command-line interfaces. This is especially helpful for those who may not be comfortable with more technical approaches. In this guide, we’ll walk you through how to create a new file using the cPanel File Manager and provide tips for using it effectively in hosting, server, and colocation environments.

What is cPanel and Why is It Important?

cPanel is a web-based control panel that simplifies the management of hosting environments. It allows website owners to perform key administrative tasks, such as managing domains, emails, databases, and files, with a user-friendly interface. For those using servers or operating within a colocation setup, cPanel becomes an invaluable tool because it offers direct access to file management, without the need for complex configurations or additional software.

With cPanel, you can easily organize your files, run scripts, create backups, and much more—all through its intuitive interface.

How to Access the cPanel File Manager

Before we dive into creating a new file, you need to access the File Manager in cPanel. Here are the steps:

Log in to your cPanel account:

Use your credentials (username and password) to access the cPanel interface via your hosting provider’s login page.

Find the File Manager:

In the Files section, you’ll see an option labeled File Manager. Click on it to launch the File Manager interface.

Steps to Create a New File in cPanel

Creating a new file using the cPanel File Manager is a straightforward process. Follow these steps to create a file:

Navigate to the Desired Directory:

Once inside the File Manager, choose the directory where you want to create the new file. If you’re working on a server or within a colocation setup, this might be your public_HTML directory (commonly referred to as public_html), where your website files are stored.

If you want the file to be accessible on the web, ensure you are inside the appropriate folder for your website.

Click on the “+ File” Option:

At the top of the File Manager window, you will see a toolbar with options such as Upload, New Folder, and + File.

Click on the + File button. This will prompt a dialog box asking for the file name.

Name Your File:

Enter the name of the file you wish to create. Ensure you include the correct file extension, such as .html, .txt, or .php, depending on the type of file you need for your hosting environment. For example, if you are creating a new HTML page, name the file newpage.html.

Create the File:

After entering the file name, click the Create New File button. The file will now appear in the selected directory.

How to Edit Your Newly Created File

Once your file has been created, you can proceed to edit it using the cPanel File Manager:

Select the File:

In the File Manager, find the newly created file in the directory and click on it.

Click on “Edit”:

With the file selected, click the Edit button in the toolbar. This will open the Edit File interface where you can add content to your file.

Add Your Content:

You can now input or modify the content of the file directly. For example, if it’s an HTML file, you can add HTML code; if it’s a PHP file, you can enter PHP scripts.

After editing, make sure to save the changes by clicking on the Save Changes button at the top of the editor.

Best Practices for File Management in cPanel

To keep your server or cloud hosting environment organized and running efficiently, here are some tips:

Organize Files in Subfolders:

Use subdirectories to organize your files logically. For example, you might create a media folder for images or a scripts folder for JavaScript and PHP files.

Backup Files Regularly:

Regular backups are critical in case of accidental file deletions or corruption. Consider using the Backup Wizard in cPanel to create periodic backups of your website files.

Limit File Permissions:

Restrict file permissions to avoid unauthorized access. In cPanel’s File Manager, you can change file permissions by selecting a file and clicking on Permissions.

Monitor Disk Usage:

Use cPanel’s Disk Usage feature to track how much space your files are consuming. This can help prevent server issues related to storage capacity, especially in colocation scenarios where multiple users share a physical server.

Conclusion

Creating and managing files using the cPanel File Manager is a quick and efficient way to handle file-related tasks on your server or hosting environment. Whether you are building a new web page, uploading scripts, or managing configurations, cPanel streamlines the entire process. With a few simple steps, you can create new files, edit them, and organize them effectively—all without needing to interact with complex command lines.

As you get comfortable using cPanel’s File Manager, it will become an indispensable tool for maintaining your website and server environment, improving both productivity and security

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!