How do I forcefully logout all WordPress users?

If you would like to sign out of all the users on your WordPress site, you did not find the any default setting for that, then do not worry about it, In this article i will explain how you can do this in a simple way.
Why should I use force logout ?
This feature is rarely used, but it helps in many situations, there are few example reasons given below

  • Suppose your site is suspected of hacking, and you think someone is still logging in to your website. This feature allows you to log off all users and then clean up your site
  • When you sign out of all the users and sign in again when using WordPress membership site, it’s important for users to log out of using premium content, for example, by sharing their login information. To solve this problem, please refer to the previous article “How prevent multiple login with same login credentials in WordPress ?“.
  • Fix some issues with membership sites and maybe reset. The first step seems to log out of existing users and perform maintenance, but you can log out of the system and perform maintenance by using this feature.

Video Tutorial

If you do not like the video or if you need other steps, please continue reading.

How can I achieve this ?
It’s pretty straight forward you go into the “wp-config.php” file and change the “Authentication Unique Keys and Salts”, it will force everyone to log back in again. It’s highly recommended that you backup your “wp-config.php” file before making any changes to it.

This configuration is typically located in the root directory of the domain. For example, if WordPress is installed as a primary domain, the wp-config.php file is in the public_html directory of the hosting account. You can view and edit files using cPanel File Manager or FTP. Open the wp-config.php file and go to the “Authentication Unique Keys and Salts” section and look up the “” link. You can use it to create a new “Authentication Unique Keys and Salts” key, copy all and replace the old code and save. When a user logged into the site URL, it automatically quits.
Authentication Unique Keys and Salts.

Hopefully, this article will help you learn how to properly forcefully quit WordPress users. If you liked this article, then please Subscribe to ScriptHere.Com by Email

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.