cpsess is a session token used by cPanel, WHM, and Webmail for secure authentication. It is added to URLs to maintain an authenticated session while preventing cross-site request forgery (CSRF) attacks.
Example of a cpsess URL in cPanel:
https://yourserver.com:2083/cpsess1234567890/frontend/paper_lantern/index.html
cpsess1234567890 > This is the session token.Cause: The session token expired or was invalidated.
WHM > Tweak Settings > Cookie IP Validation > Loosesudo systemctl restart cpanel
or/usr/local/cpanel/scripts/restartsrv_cpsrvdCause: Corrupted session or incorrect redirection settings.
https://yourserver.com:2083/sudo systemctl restart httpd
sudo systemctl restart cpanelCause: Sessions are expiring too quickly.
WHM > Tweak Settings > Session Timeout (Set to 30+ minutes)df -h
If /tmp or /home is full, clear unnecessary files.If you need to force logout all cPanel/WHM users:
rm -rf /var/cpanel/session_cleanup/*
Then restart the cPanel service:
sudo systemctl restart cpanel
| Issue | Solution |
|---|---|
| cpsess invalid session | Clear cache, restart cPanel services |
| Redirect loop with cpsess | Try incognito mode, remove cpsess from URL |
| "Session Timeout" | Increase timeout in WHM, check disk space |
| Force logout all users | Delete session files in /var/cpanel/session_cleanup/ |
By following these steps, you can fix cpsess session issues and ensure secure cPanel/WHM access.