Over the past few days, a certain form was being shown as locked. When I would try to edit that form, it would tell me that it was currently being edited by another user. I contacted that user and asked them to logout, and they assured me they had. Minutes and even hours later, the file was still locked. Figured it was a caching issue and would sort itself out over the weekend. Went back in Monday morning to make the fix, and file STILL locked. Ugh!
So, how do I force logout in WordPress? I remember that Joomla had this functionality built in, but WP does not.
Turns out there a few options. The first and most common is to add a plugin. I didn’t really want to add another plugin because I’ve been getting backup errors on this site, and am nervous about adding anything until that’s sorted out.
So, here’s a Plan B:
- You’ll need FTP access to the site. Fetch the wp-config.php file.
- Go to this site: https://api.wordpress.org/secret-key/1.1/salt/. Each time you refresh this page, the codes are randomly regenerated.
- Find the corresponding section in your wp-config.php file and replace the original code with the ones just generated by WordPress.org.
- Push the file back up to the server.
- You and all users will be immediately logged out.