This quick tutorial shows you how to log out of WordPress.
If you’re new to using WordPress, the information below will help you if you or someone you know is having difficulties working out how to log out of the WordPress administration area.
If you are working on your website in a secure environment and in your own computer, the easiest way to leave your site is to type another URL into your browser window, or by closing your browser without logging out.
If you’re working on a shared or public computer, or in an unsecured space, however, this can leave your account exposed. Someone could view your browser history, access your account and get into your WordPress Dashboard.
You can avoid having your account be tampered with or hijacked by logging off when you are done working on your site.
The simple tutorial below explains how to log out of WordPress and some additional things you can do with your WordPress logout function.
Note: When you sign into your WordPress site, a “cookie” is stored in your web browser. This cookie allows WordPress to remember who you are. If you leave your site for a while and come back again later, WordPress will recognize the cookie and not ask you to log in again.
Important: The cookie cannot tell WordPress who is actually logged into your site. If a WordPress cookie is set in your web browser, anyone using your computer can access the admin screens of your site.
To prevent this from happening (especially when using a public or shared computer) click on the Log Out link and WordPress will delete the cookie from your web browser. To reset the cookie just log into WordPress again.
Also, while you are logged into the WordPress admin, your web browser may be sending multiple requests to your server, depending on what kind of plugins you have installed, and if you are editing pages on your site (this is mainly due to the WordPress autosave feature).
These requests can add up to a large amount of resource usage if you leave your computer unattended throughout the day, especially on a shared server. This is another reason why it is also recommended that you log out of WordPress if you’re no longer working on your site.
Logging Out Of WordPress
At the far right-hand side of the Admin Toolbar is the “Howdy, User” section with an image of your Gravatar.
If you hover over this area with your mouse it expands to display your name and username, and links pointing to your “Profile Screen” and a “Log Out” link.
To log out of WordPress, click on the “Log Out” link in this section …
Your WordPress session is now terminated …
Logging Out Of All Other Sessions In WordPress
As an added security measure, WordPress lets you log out of all current sessions except the one in your current browser session. This is useful if, for example, you have left your account logged in at a public computer, or if you’ve lost or misplaced your phone.
To log out of all sessions in WordPress, go to the “Howdy, User” section and click on the “Edit My Profile” link …
Click “Log Out of All Other Sessions” …
You will be logged out of everywhere else, except for your existing browser session …
WordPress Log Out Plugins
In addition to the built-in logout functions explained above, you can extend your site’s log out capabilities using plugins.
Let’s review some of the functionality you can extend by installing WordPress plugins:
Have you noticed how most financial sites that offer online banking, credit card payments or financial services log out users after a certain period of inactivity? This is because inactive users pose a security threat to online accounts. Someone could hijack the session and access the user’s financial details.
WordPress gives you a similar functionality. You can automatically log out all inactive users with the WP Idle Logout plugin.
This is not the same as the default WordPress expired session notice that users will sometimes get when working on their site …
(Default WordPress ”Session Expired” notice)
The WP Idle Logout plugin lets the site administrator specify how long a user can be inactive on the site, before their session is automatically expired, giving you precise control of this event
To install the plugin, go to your WP admin dashboard and in the “Add Plugins” screen (Plugins > Add New), type “wp idle logout” in the keyword search field, then click “Install Now” and activate …
Once the plugin has been activated, you can configure plugin settings by selecting the Settings > Idle Logout menu …
The plugin lets you configure the following:
- Idle Time – specify the time (in seconds) that users can be idle before your site will log them out
- Idle Message – enter a message that will display to idle users, or leave this field blank to display the plugin’s default message (“You have been logged out due to inactivity”) …
You can test your settings by opening up a anonymous web browser session …
Inside your private window, log into WordPress and then letting your existing session go inactive …
Users will automatically be logged out after the set period of inactivity has passed …
Edit the time and add your own custom message instead of the default …
Logged out users will be redirected to your login page and the custom message will display to idle users above the login box …
(Custom message to logged out users)
Visit this site for more information about using the plugin: WP Idle Logout – Automatically Log Out Idle Users
This plugin helps to avoid confusion and eliminates the “2-click” logout process by installing a “Log Out” link right on the toolbar, making the logout link visible and allowing you to log off WordPress with just “one” click …
For more information about this plugin, go here: WP One Click Logout – One-Click Logout Plugin For WordPress
Protected Posts Logout Button automatically adds a logout button to your password-protected posts.
This allows users to log out immediately after viewing the private content. You can also add an optional alert message informing users they have logged out …
Use this plugin if you need to have a password-protected page to share information with clients and the default WordPress settings for session cookies to expire is too long for your purposes.
To download this plugin, go here: Protected Posts Logout Button Plugin
This plugin replaces the default WordPress meta widget with a custom widget that displays either a “login” or “logout” link and additional information depending on whether your user is logged into your site or not …
Go here to download this plugin: Login-Logout
Hopefully, you have found this tutorial on how to log out of WordPress useful.
"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org
Disclaimer: WordPress and its related trademarks are registered trademarks of Automattic, Inc. This site and the products and services offered on this site are not affiliated, associated, endorsed, or sponsored by WordPress, nor have they been tested, reviewed, or certified by WordPress. The owner, contributors and/or advertisers may derive financial benefit from sales of items advertised, linked to, or reviewed on this site.
Was this post useful? If so, please consider sharing this article with anyone thinking of starting or growing their business online using the social buttons below.