+254725682556 +254725052660 [email protected]
Client Area

Hosting

How to Recover a Deleted File Using File Manager's Trash in cPanel and DirectAdmin

If you deleted a file by mistake while working in File Manager, you probably don't need to restore a full backup to get it back. Both cPanel and DirectAdmin move deleted files to a Trash folder first, and you can usually recover the file from there within a few minutes, as long as nobody has emptied the trash since.

This only works for files deleted through File Manager. Files removed over FTP, SFTP, or SSH, or data removed from a database, don't pass through this Trash and can't be recovered this way.

How Long You Have to Recover a File

Trash isn't permanent storage. Deleted files still count toward your disk space usage until the trash is emptied, so most accounts clear it out automatically after a set number of days. The sooner you act after an accidental deletion, the better your chances of finding the file still there.

In cPanel

  1. Log in to cPanel and open File Manager.
  2. Look for View Trash (sometimes labeled just Trash) in the File Manager toolbar.
  3. Find the file you want back, select it, and click Restore. You can also right-click the file and choose Restore from the menu.
  4. The file returns to its original location. Open that folder to confirm it's back.

The same steps work for a whole deleted folder, not just individual files.

If a file was removed using a Skip the trash option, or that option is turned on by default on your account, it was deleted permanently and won't appear in Trash.

In DirectAdmin

  1. Log in to DirectAdmin and open File Manager.
  2. Look for a Trash section or toggle, usually near the top of the file list or inside the options menu.
  3. Open the trash view and locate the deleted file.
  4. Select it and click Restore to return it to its original folder.

DirectAdmin restores one file or folder at a time, so if you need several items back, repeat the restore step for each one.

If a file with the same name already exists in the destination folder, DirectAdmin won't overwrite it. Instead it restores the deleted file with a number added to its name (for example, index.php.1), so check which version you actually want to keep before using it.

If the File Isn't in the Trash

If the trash has already been emptied, or the file was deleted outside File Manager, your next option is restoring it from a backup instead. See How to Restore a Single File From a Backup Without a Full Site Restore if you need to pull just that one file back from a recent backup rather than restoring your entire account.