This quick tutorial shows you how to log out of WordPress.
If you’re brand 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.
When working on your site in a secure environment and in your own computer, the easiest way to exit your site is to enter another URL into your browser, or simply close your browser altogether without logging out.
If you’re working on a shared or public computer, or in an unsecured space, however, this presents a security risk. Someone could view your browser history, access your account and get inside your WordPress Dashboard.
You can avoid leaving your account exposed by logging off when you are done working.
The tutorial below explains how to log out of WordPress and provides additional information about ways to extend the WordPress logout function.
Note: When you log into your WordPress site, WordPress stores a “cookie” in your web browser. This cookie allows WordPress to remember who you are. If you leave your site for a while but return 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 you have a WordPress cookie set in your web browser, anyone using your computer can access your admin area.
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 your WordPress admin dashboard, your browser could be sending multiple requests to your server, depending on what kind of plugins you have installed, and if you are in the process of editing posts on your site (this is largely due to the WordPress autosave feature).
If you leave open your WordPress admin screen and leave your computer for a while, WordPress will continue sending requests to the server. This is another reason why it is also recommended that you log out of your WP dashboard when you’re no longer working on your computer or website.
How To Terminate Your WordPress Session
On the far right-hand side of the Admin Toolbar is the “Howdy, User” section with your Gravatar image.
Hover over this area with your mouse and it displays your name and username, with links pointing to your “Profile Screen” and a “Log Out” link.
To terminate your WordPress session, click on ”Log Out” …
Your WordPress session is now terminated …
How To Terminate All Other Sessions In WordPress
As an additional security prevention measure, WordPress lets you log out of all current sessions except the one in your present 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 off all sessions in WordPress, go to the “Howdy, User” section and choose the “Edit My Profile” link …
Click on the “Log Out of All Other Sessions” button …
You will be logged out of all other sessions, except for your existing session …
WordPress Log Out Plugins
In addition to the built-in log out functions explained above, you can extend your site’s log out functionality using plugins.
Here are just some of the logout functions you can enhance when signing out of WordPress:
Do you do any online banking, or buy things online using credit cards or PayPal? Have you seen how, if you leave your computer unattended for a while and return some minutes later, you will find a message telling you that your session has “expired”? This is because inactive users pose a security threat to online accounts. Someone could hijack the session and access your financial details.
With WordPress you can do the same. You can automatically log out all inactive users on your site using 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 your site, before their session is automatically expired, giving you precise control of this event
To install the plugin, go to your WordPress admin dashboard and in the “Add Plugins” screen (Plugins > Add New), enter “wp idle logout” in the keyword search field …
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 how long (in seconds) that users can be idle before the system will log them out
- Idle Message – enter the message that will show to idle users when redirected to the login screen, or leave this field blank to display the plugin’s default message …
You can test the plugin by opening up a private web browser session …
In your private window, log into WordPress and then letting your session go idle …
You will automatically be logged out after the set period of inactivity has transpired …
You can edit the time interval and add your own custom message to suit your needs …
Logged out users will be redirected to your login page and the custom message will appear to idle users above the login box …
(Custom message to logged out users)
To learn more about the plugin, visit this site: WP Idle Logout
WP One Click Logout helps to avoid confusion and improves the “2-click” WordPress logout process by installing a “Log Out” link right on the toolbar, making the log out link visible and allowing users to log out of WordPress with just “1” click …
To download the plugin, go here: WP One Click Logout – Logout Plugin For WordPress
Protected Posts Logout Button adds a logout button to your password-protected content.
This allows users to log out immediately after viewing private content. You can also add an optional alert message informing users they have logged out …
This is a great plugin if you want to share private information with privileged individuals and the default WordPress cookie expiration setting is too long for your liking.
Visit this site to learn more about this plugin: Protected Posts Logout Button
Protected Posts Logout Button 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 users are logged into your site or not …
For more information about the plugin, go here: Login-Logout
Hopefully, you have found this tutorial on how to log out of WordPress useful.
"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya
Disclaimer: This site is not associated with WordPress or any products mentioned or reviewed on this website. We may receive financial benefits from sales of third-party products advertised on this website. All images are the copyright of their respective owners, comply with all license terms and agreements of use are used solely for illustrative or training purposes.
Did you find this post useful? Feel free to use the links below to share this information with other WordPress users.