GICT knowledge base
How to Force Logout All Users in WordPress?
Published
In this tutorial, we are going to discuss about how to force logout all users in WordPress. It is necessary to logout all users from a WordPress website if your website may be hacked. You can refer this tutorial to force logout all users before the complete cleanup. This method is also useful to logout ourselves from any other device which is publicly accessible. This method is also helpful if you are performing some maintenance on your website. There are two different methods to force logout all users from a WordPress website.
Method 1: Editing wp-config.php File
1) Login to cPanel and click on ‘File Manager’.

2) Locate your ‘wp-config.php’ file for the particular website.

3) Right-click the ‘wp-config.php’ file and select the ‘Edit’ option.

4) Scroll down the file and locate a block of code which indicates authentication keys and salts.

5) Replace the following block of code with another one, then WordPress will immediately log out all user accounts.
You can get the new set of keys by visiting the website https://api.wordpress.org/secret-key/1.1/salt/. A new set of random keys are generated each time you visit this website. Remove the keys in wp-config.php file and copy paste the new set of keys for this website.
6) Save the ‘wp-config.php’ file then all users will be logged out.
Method 2: Using WordPress plugin “Force ReAuthentication”
Install the plugin ‘force ReAuthetication” from your WordPress dashboard. With this plugin, you can force logout a single user or bulk logout all users at a time.
If you need any further help, please do reach our support department.
Related guides
7 Common Hosting Mistakes Beginners Make (And How to Avoid Them)
7 common hosting mistakes beginners make in 2026: no backups, ignored updates, bad host choice, weak passwords, single point of failure, no staging. With fixes for each.
WordPressWebsite Migration Backup Checklist: What to Save and How to Test
Prepare a website migration backup: inventory files, databases, email and DNS, check archive integrity, test recovery and plan a safe final synchronization.
WordPressCore Web Vitals in 2026: A Practical Fix Guide for Site Owners
Core Web Vitals 2026: practical fixes for LCP, INP, and CLS. Real root causes, what to measure, common misconceptions, and a priority order of fixes for site owners.
WordPressFixing the WordPress “Death Loop”: When Missing Files slow down your site
You’ve just launched your new WordPress site or pushed a big update. In your staging environment, everything ran perfectly.
