If you feel anything suspicious in your WordPress site or just want to perform scheduled maintenance, you may definitely want to kick out all WordPress users for a while. Unfortunately, there is no option by default. In this post, we are going to teach how to force logout all the WordPress users easily.
Why and When to Do It?
If you have LMS plugin or membership site, you may definitely want all users to log in again to your site and this tutorial will help you. There are different reasons behind it. For example, you may feel that your site might be hacked. So, you may force logout all the users to clean up your site properly.
If you are using a site on pay-per-view basis or a membership site and suspect that users might share their passwords to access your site, it will come in handy. You can also keep them from sharing their login credentials after force logging them out.
Another instance is when you are using Wi-Fi without VPN or a public computer. This method will help you end all sessions if you are not confident that you are signed out well. This way, let’s take a look at the steps to forcefully log out all users.
Grow your email list and use Contact form at its best on WordPress with our helpful guide.
Steps to Force Sign Out all Users
For doing that, you will need to edit wp-config.php, a WP Config file. It is strongly advised to backup this file before you make any changes. First of all, use FTP to connect to your site or going to cPanel to use File Manager. Wp-config.php file is usually found in root folder of your site.
- Right click and choose ‘edit’ to open file
- A code block will be found in the wp-config.php file
- You are also likely to find each lines with a parameter “put your unique phrase”
- These are WordPress security salts and keys.
- Visit WordPress Salts generator where you can randomly create new strings in wp-config.php file.
- Add new keys to replace the existing ones. Once finished, save changes and upload the WP Config file again.
- After changing WP salts, it will log out everyone automatically and force them to login again.
Improve Password Security for All
If you ask your users to register on your membership site, there are chances that they will choose passwords that are weak and easy to remember. One can easily crack weak passwords and it will cause security threat to your site.
If you suspect any malicious activity in your site, you can just reset all passwords on your site. This way, users will want to generate new passwords. But they can still use same password. To keep them from doing the same mistake again, force them to add strong passwords.
For your WordPress site, we recommend you the bestselling plugin like WpBakery page builder.