How to Setup WordPress Two Factor Authentication

If you have a WordPress site, I highly recommend requiring two-factor authentication. WordPress sites are often hacked due to poor passwords. There are many solutions for adding two-factor auth but I believe this is the best way.

Plugins Required

  • Jetpack for WordPressI highly recommend Jetpack for multiple reasons including spam prevention, security, and two-factor auth.
  • Code SnippetsCode Snippets is an easy, clean, and simple way to run PHP code snippets on your site. It removes the need to add custom snippets to your theme’s functions.php file. Code snippets are great for adding code to a WordPress site

Steps

  1. Install the required plugins and setup Jetpack account
  2. Enable two-factor login for Jetpack account
  3. Enable the Jetpack setting for your site. Look for a setting under the security tab labeled: “Require accounts to use WordPress.com Two-Step Authentication”
  4. Add a code snippet that includes these two filters
    1. add_filter( ‘jetpack_sso_require_two_step’, ‘__return_true’ );
    2. add_filter( ‘jetpack_remove_login_form’, ‘__return_true’ );
  5. Test your login to make sure everything is working properly and two-factor auth is required.

Hope these steps help you to enabled and require two-factor authentication for your WordPress site. Make sure you secure all your passwords using these password management tips.


Thanks for reading. Make sure you follow me on Twitter to stay up to date on the progress of my side projects T.LYWeather Extension, and Link Shortener Extension. If you are interested in the tech I use daily, check out my uses page.  

Leave a Reply

Your email address will not be published. Required fields are marked *