Latest Tech and Tips

How to Force Logout All Users in WordPress


Do you need to pressure logout all customers in WordPress? If you think that your WordPress could also be hacked or simply want customers to login once more, then there is no such thing as a default choice to do this in WordPress. In this text, we’ll present you ways to simply pressure logout all customers in WordPress.

Why and When You May Want to Force Log out All Users in WordPress?

If you run a WordPress membership website or an LMS plugin, and also you want all logged in customers to re-login, then this tutorial is for you.

You might want to do that for various causes. For instance, in the event you suspect that your WordPress website is hacked, then forcing logout will enable you to correctly clear up your hacked WordPress website.

Next, in case you are utilizing a membership or pay per view website and worry that customers could also be sharing their passwords to entry content material, then this methodology will come in helpful. After logging them out, you’ll be able to cease them from sharing passwords.

Another situation is that whenever you use a public pc or WiFi with out utilizing a VPN service. If you aren’t positive that you just correctly logged out, then this methodology will finish all logged in classes.

That being stated, let’s check out how to simply logout all customers in WordPress.

Force Log Out All WordPress Users

For this tutorial, you may be modifying WP Config file referred to as wp-config.php. We extremely advocate that you just backup your wp-config.php file earlier than making any modifications to it.

First you have to to join to your web site utilizing FTP or by way of File Manager in cPanel. Once linked, you can see the wp-config.php file in your website’s root folder.

Editing wp-config.php file via FTP

You can proper click on and choose edit to open the file in a textual content editor.

Inside your wp-config.php file you can see a code block that may seem like this:

outline('AUTH_KEY',         'K2#m<|[UO==4Nv c+Ox+^]NH.H*6DmQRJntnj|SwKg)>,>O-z/IeRr?>5lmx`Hf:');
outline('SECURE_AUTH_KEY',  '-Qf(}6G(zB`(D*)]fe;iEw?M]PU>BY:$Ni6]~mYCfZ68l_M@R<5E_ICbPUVk.Vf@');
outline('LOGGED_IN_KEY',    '6R6:bur.^!Q1K-/H!$]A$g3JaaO]r|B&zu~{-*})|+C|<V,^c|f^vlhp$urvTr7>');
outline('NONCE_KEY',        'LM7}+||^qoISh4#q_ ST%#x0vke+TQD(^$W{lVQ_TyV!%,N++H)4+>uSZl6ZpercentW[3');
define('AUTH_SALT',        'PpS;19y?W31AY@:=,RC;&0kkNXNkP -v=Lr;ghGft:?WV5vA-lje|h{A19Tfzq$[');
define('SECURE_AUTH_SALT', '+H.u}x4u<6-^HY+<?oRkZ{9T)E_)rR+uy.3Rpm*Z&S|UUO|5Wh6cn9.2pq+o4P[M');
define('LOGGED_IN_SALT',   'I{uT;rv5S`JRRs}=1+Ls_3YMDR^;|U[&x^Oy!yg2-:BO%|0W@c-n|SY8D3zo7-8-');
define('NONCE_SALT',       ':0Y`/h3JhwMRNCj~z[1}N@5QKp0|-s4C+XR~/-q6PfZ&Q.qFY5-]qS|L,CNbv>/z');

It can be attainable that every of those strains simply have ‘put your unique phrase here’ because the second parameter.

These strains are referred to as authentication keys and salts. To study extra about them see our information on WordPress safety keys.

Next, you want to go to the WordPress Salts generator web page. This web page randomly creates new key strings that you should utilize in your wp-config.php file.

Generating WordPress security keys

You want to substitute your current keys with the brand new ones that you just simply generated. Once carried out, be sure to save your modifications and add your wp-config.php file again to the server.

Changing the salts will mechanically log everybody out of your web site, forcing them to relogin.

Improving Password Security for All Users on Your WordPress Site

If you run a membership web site or enable customers to register in your website, then customers are seemingly to use simple to keep in mind and weak passwords.

Weak passwords are simple to crack and pose a safety problem on your web site.

If you think that your web site is hacked, then it’s your decision to safely reset passwords for all customers in your WordPress website. This will enable them to generate new passwords for his or her accounts.

However, customers can nonetheless use the identical password that that they had earlier than. To keep away from this from occurring once more, you’ll be able to implement sturdy passwords for all customers in your WordPress website.

One of the most typical query we get at any time when we advocate utilizing sturdy passwords is how to keep in mind all these troublesome passwords?

The reply is straightforward, you don’t want to. There are apps out there that may handle passwords for you. See our information on how to handle WordPress passwords for extra on this matter.

We hope this text helped you find out how to pressure logout all customers in WordPress. You may need to see our full step-by-step WordPress safety information for freshmen.

If you appreciated this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You also can discover us on Twitter and Facebook.