WordPress is an open source content management tool. It is written in PHP and MySQL. It is an easy platform to create beautiful sites. You can let multiple users sign in to the website through the content management system. During a session, if you find that your website may have been compromised or someone unauthorized is accessing the system, you can easily log out all the users at once from the site by making some changes to the WordPress configuration file. In this guide, we will guide you through the steps on how you can force log out all the users at once from the site.
- A Domain Name (e.g., example.com)
- Hosting service with cPanel Access
Click on File Manager to access the root directory of your WordPress site.
This file wp-config.php file is located inside the public_html folder of the root directory of your website. It can be accessed through the File Manager in your cPanel or through an FTP application.
When you click edit, a dialog box will appear like the one shown below. Click Edit button to edit the configuration file in the Text editor.
You can simply press Ctrl+F in your browser and search for the keyword Auth and it will take you directly to the code which will look like the one below.
These keys help in authenticating the user. These lines are also known as authentication keys & salts.
This page generates new key randomly that can be implemented in the wp-config files. A randomly generated authentication key & salt pair looks like the one below.
This site generates random key everytime it gets reloaded.
By following the above steps, you can save your website from unauthorized access by logging out everyone in the system. Never give your account credentials to an unauthorized person.