How to Create Files and Folders in cPanel
You don't always need to upload files from your computer to build your website. Sometimes, it is much faster to build your site's structure directly on the server. Whether you are setting up a new directory for your images or creating a blank HTML page from scratch, the cPanel File Manager allows you to create new files and folders instantly.
Step 1: Open the File Manager
Before we can start building, we need to access the file system within your hosting dashboard.
- Log in to your primary cPanel account.
- Locate the Files section near the top of the dashboard.
- Click on the File Manager icon to open your server's directory in a new browser tab.
- On the left-hand sidebar, click on the public_html folder. This is the main folder where all your live website content must be placed.
Step 2: Create a New Folder (Directory)
Folders keep your server tidy. You might want to create a folder named "css" for your stylesheets or "assets" for your media.
- Look at the top toolbar inside the File Manager and click the + Folder button located in the top-left corner.
- A small pop-up window will appear. In the New Folder Name field, type the name of your directory. (Pro tip: Always use lowercase letters and avoid spaces. Use dashes instead, like "my-images").
- Verify that the New Folder will be created in path is correct (it should say /public_html or the specific subfolder you want it in).
- Click the Create New Folder button. Your new directory will instantly appear in the list!
Step 3: Create a New File
Now that your folders are organized, you can create the actual documents that make up your website, like a blank index.php or about.html file.
- Navigate into the exact folder where you want the new file to live by double-clicking it.
- Click the + File button in the top-left corner of the toolbar.
- In the pop-up window, type your desired filename into the New File Name box. You must include the file extension (for example, type contact.html or style.css).
- Click Create New File.
- To start writing code inside your new blank file, simply right-click it in the list and select HTML Editor or Edit from the dropdown menu!
Accidentally created a file in the wrong place or need help recovering a deleted folder? Open a support ticket and our SastoHost team will be happy to assist you with your server structure.
