/go/clearsession deletes every PHP session file on the server. Sites that keep their login or cart data in PHP sessions lose it, so visitors are logged out and must sign in again. It first runs session to make sure the session directories exist with the right permissions, then empties them. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Delete all PHP session files
/go/clearsession
[!WARNING]
This signs out every user of every site that stores sessions in these folders, including administrators, and empties shopping carts and unsaved form data. It runs immediately, with no confirmation and no way to undo it. To delete only old sessions, useclean.
Examples
# Clear all sessions, for example after a security incident or a session-related PHP bug
/go/clearsession
# Check how many session files exist before clearing
ls /var/lib/*/session | wc -l
Output
The command prints nothing. Unlike most GoAdmio commands, it doesn’t write to a log file in /var/log/go/.
It doesn’t re-run itself as root. Each step is run with sudo, so the account you use must be able to run sudo without being blocked.
See the full reference at /go/clearsession and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
