WordPress.org

Support

Support » How-To and Troubleshooting » Protect all your WordPress sites on your cPanel server quickly and easily

Protect all your WordPress sites on your cPanel server quickly and easily

  • Help to protect all your WordPress sites on your cPanel server from the new Brute Force Botnet Attacks, quickly and easily, by requiring a htaccess password prior to WordPress login.

    user@server [~]# sudo -i # Log in as the root user.

    root@server [~]# vi /usr/local/apache/conf/includes/post_virtualhost_2.conf # Edit the file.

    # Paste the following lines.
    ErrorDocument 401 "Unauthorized Access"
    ErrorDocument 403 "Forbidden"
    <FilesMatch "wp-login.php">
    AuthName "Authorized Only"
    AuthType Basic
    AuthUserFile /home/.wpadmin
    require valid-user
    </FilesMatch>

    root@server [~]# htpasswd -c /home/.wpadmin pressuser # Enter and confirm password.

    root@server [~]# cat /home/.wpadmin # Verify correct username.

    root@server [~]# chmod 755 /home/.wpadmin # Set access permissions.

    root@server [~]# service httpd restart # Restart the web server.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Protect all your WordPress sites on your cPanel server quickly and easily’ is closed to new replies.
Skip to toolbar