How to Create or Delete a Directory Using the FileZilla FTP Client?
Use FileZilla to create new directories on your hosting or remove existing folders. Connect via FTP or SFTP, navigate to your target path, then right-click to create or delete directories. Remember that deletions are permanent on the server.
In FileZilla, connect to your hosting, work in the remote pane on the right, then right‑click to Create directory to make a folder or right‑click a folder and choose Delete to remove it. Confirm the prompt. Deletions on the server are permanent.
Before you start
- Have your FTP or SFTP login. You can use your main cPanel username and password, or create/check an account in cPanel under FTP Accounts.
- Know the correct path. On Hostworld cPanel hosting, your website files for the primary domain live in public_html.
- Back up anything you might delete. FTP deletions have no recycle bin.
Step 1: Connect to your hosting in FileZilla
Open FileZilla. In the Quickconnect bar enter Host, Username and Password. Leave Port blank unless you have been told to use one. To use secure protocols, prefix the host with sftp:// for SFTP over SSH or ftps:// for FTPS. Click Quickconnect. After a successful connection the right pane shows the server (remote) files and the left pane shows your computer (local). Check which pane you are in before you create or delete anything: the same right‑click actions in the left pane create and delete on your own computer, not on the server. If you cannot see dotfiles such as .htaccess, open the Server menu and choose Force showing hidden files.
Step 2: Create a directory in the remote pane
In the right pane, navigate to the exact target path, for example public_html or a subfolder within it. Right‑click in blank space and choose Create directory, or choose Create directory and enter it to create and open it in one go. Name the directory and confirm. If the listing does not update, use Refresh.
Undo: to remove a folder you created in error, delete it using Step 3 below, which covers the confirmation prompt and the cases to watch for.
Step 3: Delete a directory in the remote pane
In the right pane, navigate to the folder’s parent, then right‑click the directory you want to remove and choose Delete. FileZilla will ask you to confirm, for example “Really delete all selected files and/or directories from the server?”. Confirm to proceed. Deleting a non‑empty folder will recurse through every file and subfolder, which can take time. Let it finish. If you cancel or the connection drops part‑way, you can be left with a partial directory structure, and applications that expect that structure to be intact may then fail. If FileZilla shows a special prompt for a symbolic link, choose carefully. Deleting the link removes the link itself. Removing the contents of the linked directory may erase files elsewhere on the server.
Important: do not delete public_html itself. That would take your site offline.
Undo: FTP/SFTP deletions are permanent on the server. To recover, restore the directory from your own backup or re‑upload the files. If you need us to check recovery options, open a support ticket.
If it does not work
- Connection or “Failed to retrieve directory listing”: Listings and transfers use a separate data connection. Passive mode is recommended because it uses outbound connections from your computer. Try SFTP (sftp://, default port 22) or FTPS (ftps://, implicit FTPS commonly uses 990, plain FTP uses 21). Firewalls that block data connections will stop listings.
- “550 Permission denied” or “Create directory operation failed”: You are not allowed to write to that path. In cPanel, check the FTP account’s Directory in FTP Accounts and make sure it includes the folder you are working in, or log in with the main cPanel user that owns public_html.
- Cannot see a file or folder such as .htaccess: In FileZilla go to Server, then Force showing hidden files. Dotfiles are hidden by default.
- You created or deleted something and cannot find it on the server: check the left (local) pane. The action may have run on your own computer.
If you are unsure where it is safe to add or remove folders, or a delete appears stuck, open a support ticket and tell us the exact path you are working in.
What next
If you are managing files on a VPS rather than cPanel shared hosting, SFTP and firewall notes are covered in our VPS guides.
Common questions
How do I connect to my hosting in FileZilla?
Open FileZilla, enter your FTP or SFTP host, username and password in the Quickconnect bar, then click Quickconnect. Use sftp:// or ftps:// prefix if you need a secure protocol. The right pane will show your server files once connected.
Where should I create directories on my website?
Create directories within public_html or its subfolders. Do not delete or create directories at the public_html level itself, as this would take your site offline.
Can I undo a deleted directory in FileZilla?
No. FTP and SFTP deletions are permanent on the server. You must restore from your own backup or re-upload the files. Contact support if you need help with recovery options.
What does 'Permission denied' mean when I try to create a directory?
You do not have write access to that path. Check your FTP account's directory restrictions in cPanel, or log in with your main cPanel username which owns public_html.
Why can't I see hidden files like .htaccess?
Dotfiles are hidden by default in FileZilla. Go to the Server menu and choose Force showing hidden files to display them.
Was this article helpful?
0 people found this helpful