User Sessions
Plugin for WordPress to list and manage active user sessions.
by Daniel Lucia · github.com/daniellucia/dl-user-sessions · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/daniellucia/dl-user-sessions/archive/refs/heads/master.zipDeclares an update source (http://www.daniellucia.es/), so updates arrive through the plugin's own updater.
Readme
User Sessions
Plugin for WordPress to list and manage active user sessions.
Administrators can view all active sessions, see details such as IP, browser and login time, and close individual sessions or all sessions for a user.
Features
- Lists all active sessions of registered users.
- Shows login time, last activity, IP address and browser (user agent).
- Allows closing individual sessions or all sessions of a user.
- Uses the native WordPress session system (
WP_Session_Tokens). - Simple HTML table interface integrated into the WordPress admin.
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
Installation
- Download the plugin and place the folder
dl-user-sessionsinside/wp-content/plugins/. - Activate the plugin from the Plugins menu in the WordPress admin.
Usage
- Go to Users → Sessions in the WordPress admin.
- The table will display all active sessions with user details.
- Use the Log Out button to terminate a single session or the available bulk actions (if implemented) to close multiple sessions.
Security
- All actions require the
list_userscapability. - Nonces are used to validate session termination requests.
Development
The plugin is organized using a namespaced class structure.
Main files:
dl-user-sessions.php– Plugin bootstrap.src/Plugin.php– Core logic to list and manage sessions.
To modify or extend the plugin, follow WordPress coding standards and keep actions and filters inside the main class.
License
GPL-2.0-or-later
This plugin is open-source and distributed under the GNU General Public License.