How I Recovered a Crashed WHM/cPanel Server and Restored Websites
A few days ago, a client contacted me because all websites hosted on their WHM/cPanel server suddenly went offline.
The server was running on a Linux VPS with WHM/cPanel installed. Multiple websites were down, email services were not responding, and the client was concerned about potential data loss.
In this article, I'll walk through the troubleshooting and recovery process I used.
Step 1: Verify Server Accessibility
First, I checked whether the server was reachable via SSH.
ssh root@server-ip
The server was accessible, which meant the VPS itself was still running.
I then checked the system load and uptime:
uptime
top
This helped identify whether the server was overloaded or suffering from resource exhaustion.
Step 2: Check Disk Usage
One of the most common causes of service failures on cPanel servers is a full disk.
df -h
In this case, disk usage was critically high.
To locate large files:
du -sh /var/* | sort -h
After identifying unnecessary log growth, old logs were cleaned safely.
Step 3: Verify Core Services
Next, I checked the status of essential services.
systemctl status httpd
systemctl status mysql
systemctl status named
systemctl status exim
Apache was not running correctly.
To restart services:
systemctl restart httpd
systemctl restart mysql
Step 4: Review Error Logs
Logs provide the real story.
Apache errors:
tail -100 /usr/local/apache/logs/error_log
System messages:
tail -100 /var/log/messages
These logs revealed configuration issues that prevented Apache from starting.
Step 5: Validate Apache Configuration
Before restarting production services, configuration should always be validated.
apachectl configtest
Output:
Syntax OK
After verification:
systemctl restart httpd
Websites started loading again.
Step 6: Verify MySQL Health
Database availability is critical for WordPress and dynamic websites.
systemctl status mysql
mysqladmin ping
Database services were functioning normally after recovery.
Step 7: Check cPanel Services
To ensure WHM and cPanel services were healthy:
/usr/local/cpanel/scripts/restartsrv_cpsrvd
Verify service status:
service cpanel status
Step 8: Validate DNS and Email Services
DNS:
systemctl status named
Email:
systemctl status exim
All services were tested and confirmed operational.
Final Verification
After restoring services:
- Websites were accessible
- WHM login worked
- cPanel accounts loaded correctly
- Email delivery was functioning
- DNS resolution was successful
Conclusion
Server recovery is rarely about running a single command. The key is following a structured troubleshooting process:
- Verify server access
- Check disk space
- Review service status
- Analyze logs
- Validate configurations
- Restore services safely
By following a systematic approach, I was able to recover the crashed WHM/cPanel server and restore all hosted websites with minimal downtime.
Have you ever dealt with a production server outage? Share your experience in the comments.
Top comments (0)