• Tuesday, October 28, 2025

In the dynamic environment of web hosting, ensuring the safety and availability of your website's data is paramount. cPanel offers a robust feature for file and directory restoration, enabling users to recover lost or corrupted data efficiently from local backup sources. This guide will walk you through the process of using the File and Directory Restoration interface within cPanel, detailing how to navigate the options and successfully restore your valuable files and directories.

Key Considerations Before Restoration

It is important to be aware of certain prerequisites and limitations concerning the File and Directory Restoration feature in cPanel:

  • This restoration functionality is only visible and accessible if your hosting provider has specifically enabled it within their server profile.
  • To utilize this feature, your system administrator or hosting provider must ensure that account backups and other necessary configurations are active in WHM’s Backup Configuration interface.
  • This interface is designed exclusively for restoring items from local backup files. If your backups are stored remotely, you will need to transfer the desired remote backup files to the local server before initiating the restoration process.
  • Please note that this interface does not support the restoration of your account’s .cpanel and mail directories. For these specific directories, a full account backup restoration is required.
  • When a restoration is performed, any deleted files will be recovered, and existing files with matching names will be overwritten. It is advisable to exercise caution and ensure you are restoring the correct version of your files.

Navigating the File and Directory Restoration Interface

The File and Directory Restoration interface is intuitively designed with two main sections: "Files and Directories" and "Backups." The "Files and Directories" section displays the available files and directories that have associated backups, while the "Backups" section lists the specific backup versions for the selected file or directory.

You have two primary methods to access and restore backups through this interface: by entering a direct path to the desired file or directory, or by browsing through your file system to locate the item you wish to restore.

Restoring Files and Directories Using a Direct Path

This method allows for a quick restoration if you know the exact path to the file or directory you need to recover. Follow these steps:

  1. In the "Files and Directories" section of the interface, select the "Enter a path" option. This will enable a text box for path input.
  2. Carefully enter the direct path to your file or directory within the provided text box. This path is relative to your cPanel account's home directory. For instance, to specify the public_html directory, which typically corresponds to /home/user/public_html (where user is your cPanel account username), you would simply enter public_html.
  3. After entering the path, click "Show Backups." The system will then display a list of available backups specifically for that file or directory in the "Backups" section.
  4. From the list presented in the "Backups" section, select the particular backup version you wish to restore and then click the "Restore" button.
  5. A confirmation prompt will appear, asking you to verify the restoration. Click "Restore" once more to confirm your action. A success or failure message will subsequently be displayed, indicating the outcome of the restoration process.

Note: When you choose the "Enter a path" option, the system focuses solely on the specified path and will not display the contents of a directory. To browse directory contents, you must select the "Browse files and directories" option instead.

Browsing and Restoring Files and Directories

If you are unsure of the exact path or prefer to visually navigate your file system, the browsing option is ideal. This method allows you to explore your home directory to locate the specific file or directory for restoration.

  1. Within the "Files and Directories" section, select the "Browse files and directories" option. This will immediately display the contents of your cPanel account's home directory. You can then click on any directory name to view its contents, allowing for easy navigation.
  2. Once you have located the desired file or directory, click "Show Backups." A comprehensive list of available backups for that selected item will then populate the "Backups" section.
  3. In the "Backups" section, identify and choose the specific backup that you intend to restore, and then click the "Restore" button.
  4. The system will present a confirmation message. To proceed with the restoration, click "Restore." Following this, a message will indicate whether the restoration was successful or if an issue occurred.

Upon successful completion, the restored files and directories will be accessible in their original locations within your home directory, reverting to their state at the time the backup was created.