How to Restore Partial Files In cPanel
You have designed that cool website or web application and everything is working pretty well. However, you accidentally deleted a file when maintaining your website in cPanel.
In this guide, we will show you how you can restore partial files from your cPanel account if you accidentally deleted them.
Prerequisites
- A domain name (e.g., www.example.com)
- Web hosting account that supports Cpanel
- Cpanel username and password.
Step 1: Login to your cPanel account
First, you need to login to your cPanel account by visiting the URL ‘www.example.com/cpanel’ where ‘example.com’ is the primary domain name associated with your hosting account. Then, just enter your username and password and click on Log In.
Step 2: Locate File Manager
Under the ‘FILES’ heading, locate >File Manager> and click on the Files icon.
Step 3: Locate the file from Trash bin
When you delete a file from cPanel File Manager, it is automatically sent to the trash bin unless your specifically skip this option. The trash is just like a recycle bin on your computer.
So to restore the file, click on the ‘View Trash’ option as shown below:
All the files that were deleted will be displayed on the next screen as shown:
You can always click on a column (e.g. Name, Size, Last Modified or Type) to sort the files either ascending or descending. For instance, if you arrange the files with the ‘last modified’ column, files that you update recently will show at the top. This will help you restore the right files.
Once you decide on the right file to restore, right click it from the list and click on the ‘Restore’ Option towards the bottom of the context menu as shown below:
In the above screen, we have chosen the ‘index.php’ file which should be restored back to its original folder. Once you get a confirmation message, click on ‘Restore File(s)’
You can restore as many files as you want either by selecting them individually or by selecting multiple files at once. When selecting multiple files, press the ‘CTRL’ button on your keyboard and use your mouse to click the files needed.
The files you select do not have to follow each other on the list. For instance, in the image below, we have selected the first and the third file for restoration and skipped the second file name.
Multiple file selection can save you a lot of time especially if you have many different files that need to be restored.
Test your website
Once the restoration is complete, test your website or web application again. If you have restored all the files as needed, your website should be working again without any problems.
Conclusion
Those are all the steps that you should follow to restore partial files right from cPanel account. As always, never delete files permanently unless you have created another backup on your local computer. The restoration procedure above only works if files are sent to the trash when deleting them, otherwise, the files cannot be recovered. I hope you enjoyed reading the guide.
Check out these top 3 cPanel hosting services:
- Want to get top recommendations about best hosting? Just click this link!