Why Reset the cPanel File Manager?
Resetting the cPanel File Manager can help in several situations:
- You want to start fresh with a clean file structure.
- Your website files are corrupted or infected by malware.
- You’re facing errors when running scripts or installing applications like WordPress.
- Your storage is full, and you need to delete unnecessary files.
Step 1: Log in to Your cPanel Account
- Open your web browser.
- Go to your cPanel login page:
https://yourdomain.com/cpanel
orhttps://yourdomain.com:2083
. - Enter your username and password, then click Log in.
Step 2: Open the File Manager
- Once inside cPanel, locate the Files section.
- Click on File Manager to open the directory structure of your account.
Step 3: Show Hidden Files (Optional but Recommended)
Some important files (like .htaccess
) are hidden by default.
- Click on the Settings button in the top-right corner of the File Manager.
- Check the box that says Show Hidden Files (dotfiles).
- Click Save.
Step 4: Select and Delete Existing Files
To reset the File Manager, you need to remove existing files and folders.
- Inside File Manager, click on Select All to highlight all files.
- Click on the Delete button in the top menu.
- A confirmation pop-up will appear.
- If you don’t need to use the Recycle Bin, select the option to Skip the trash and permanently delete files.
- Click Confirm Deletion.
At this point, all files and folders (except system-generated ones like trash
or cpanel
) will be removed.
Step 5: Reload the File Manager
- Click the Reload button.
- You may see a few remaining folders (
cpanel
,logs
,etc.
) – these are system files required for cPanel to function properly.
Step 6: Upload Default cPanel Files (If Needed)
If you want to restore the default cPanel file structure, follow these steps:
- Download the default cPanel files from your hosting provider or use a backup.
- Click on the Upload button in File Manager.
- Select the ZIP file containing the default files and click Open.
- Wait for the upload to complete.
Step 7: Extract Uploaded Files
- Locate the uploaded ZIP file in File Manager.
- Click on it, then select Extract from the top menu.
- In the extraction window, set the destination folder as
/
(root directory) orpublic_html
. - Click Extract Files.
After extraction, the original cPanel files and folders will be restored.
Step 8: Verify the Reset Process
- Ensure that the public_html folder is clickable and accessible.
- If using WordPress or other CMS, check if the necessary files (
wp-config.php
,index.php
, etc.) are present. - If files are missing, restore them from a backup.
Step 9: Delete the ZIP File (Optional)
After resetting your File Manager, it’s a good practice to remove unnecessary files:
- Select the uploaded ZIP file.
- Click Delete and confirm.
This step helps free up disk space and keeps your hosting account tidy.
Alternative Method: Reset Using Terminal (For Advanced Users)
If your hosting provider allows SSH access, you can reset the File Manager using command-line operations:
cd /home/yourusername
rm -rf public_html/*
mkdir public_html
Note: This command deletes all files inside public_html
. Ensure you have backups before proceeding.
Best Practices When Resetting cPanel File Manager
- Take a Backup First – Download a full backup from cPanel > Backup Wizard.
- Avoid Deleting System Folders – Keep essential folders like
etc
,mail
, andlogs
. - Check for Malware – If your files were hacked, scan your website using security plugins before restoring.
- Use a Fresh Installation – If resetting for WordPress, consider reinstalling a fresh copy of WordPress after resetting.
Common Issues & Troubleshooting
1. Deleted Essential Files by Mistake?
- If you accidentally removed important files, restore them from cPanel’s Backup Wizard.
- Contact your hosting provider for assistance.
2. Website Not Loading After Reset?
- Check if
public_html
exists and contains website files. - Ensure your domain is pointing to the correct directory.
3. Can’t Access File Manager?
- Clear browser cache or try a different browser.
- Ensure your cPanel account is active and not suspended.
Conclusion
Resetting cPanel File Manager is an easy process that helps clean up your hosting account and resolve file-related issues. Whether you’re preparing for a new website, fixing corrupted files, or simply organizing your storage, following these steps ensures a smooth reset.
Key Takeaways:
✔ Use File Manager to delete and reset files. ✔ Enable Show Hidden Files for better visibility. ✔ Upload and extract the default cPanel files if needed. ✔ Always take a backup before making major changes. ✔ If needed, use Terminal/SSH for a manual reset.
By following this guide, you can efficiently reset your cPanel File Manager and ensure a well-organized and optimized hosting environment!