Skip to main content

cPanel: Rename files and directories

Use File Manager in cPanel to rename files and directories directly in your browser. Their contents remain unchanged.

Who is this guide for?

This guide applies exclusively to customers whose hosting is managed on the new Webland platform (WHMCS) and whose hosting plan includes cPanel.

Essential Hosting without cPanel: This guide does not apply to your hosting.

Previous platform using System Configurator or Domain Manager: Sign in at classic.webland.ch. The steps below do not apply to that platform.


Important information

  • Renaming can break existing links and file paths. References in your website or application are not updated automatically.

  • Renaming a directory also changes the paths to the files and subdirectories inside it.

  • Keep the file extension, such as .php, .html or .png, unless you specifically need to change it.

  • Note the original name so you can undo the change if necessary.

  • Select only one file or directory at a time when renaming.


Requirements

Before you begin, make sure you:

  • Have access to your cPanel hosting service.

  • Know which file or directory you want to rename.

  • Have checked whether your website uses the existing name or path.


Step 1: Sign in to cPanel

  1. Find your hosting service in the active services overview in the client area.

  2. Click “Log in to cPanel”.

You will be signed in to cPanel automatically.


Step 2: Open File Manager

Open the “Files” section in cPanel and click “File Manager”.


Step 3: Select the file or directory

  1. Navigate to the relevant location.

  2. Select the file or directory.

  3. Click “Rename” in the toolbar.


Step 4: Enter the new name

  1. Enter the new name.

  2. Check the spelling and, for files, the file extension.

  3. Click “Rename File”.

The new name will appear in the file list.

Example: Rename image-old.png to image-new.png. The .png extension stays the same.

Alternatively, edit the name directly in the file list and press Enter to confirm.


Step 5: Check references and functionality

Update all affected links, file paths and application settings. Then test the relevant website or feature.

If you renamed a domain’s website directory, its Document Root must also point to the correct directory.


Troubleshooting

Renaming fails

Check whether an item with the new name already exists in the same directory and whether you have the required permissions. Read the displayed error message.

My website stopped working after renaming

First restore the original file or directory name. Then identify which references need updating before trying the change again.

A link returns a 404 error

Check whether the link still uses the old name. Pay attention to capitalisation.

A file is no longer processed correctly

Check whether you accidentally changed or removed its extension. Restore the complete original filename if necessary.

Did this answer your question?