How To Protect Your WordPress Site From A Brute-Force Attack

Learn how to protect your WordPress site from being brute-force attacked, or having its security compromised by hackers or bots.

WordPress SecurityWordPress is often the target of malicious attacks by hackers, due to its global popularity.

In early 2013 a large-scale brute-force attack struck WordPress installations on almost every WP hosting server in existence around the world.

These attacks were caused by botnets (infected computer networks programmed to attack other vulnerable computers).

How To Protect Your WordPress Site From A Brute-Force Attack

What Are Brute Force Attacks?

A brute-force attack is a technique used to break an encryption or authentication system by trying all possibilities.

(Source: Chinese University Of Hong Kong)

One of the many ways hackers will attempt to break into WordPress sites is by trying to guess the site’s administration login username and password. This can be done using software tools that automatically tries to guess hundreds of login combinations in minutes.

If you’re using weak usernames and weak passwords that are easy to guess, your website can be easily hacked by repeated attempts to guess your site’s login details.

This is called a “brute force” login attack.

Botnet – What Is This?

A botnet is a number of Internet-connected computers communicating with other similar machines in an effort to complete repetitive tasks and objectives. This can be as mundane as keeping control of an Internet Relay Chat (IRC) channel, or it could be used to send spam email or participate in distributed denial-of-service attacks. The word botnet is a combination of the words robot and network.

(Source: Wikipedia)

”Botnets” are networks of private computers that have been compromised and infected with malicious scripts or software, which are then controlled remotely as a group, typically without the computer owners’ knowledge or awareness.

Botnets are typically used to send mass spam emails from the infected computers of compromised user accounts.

Below is a screenshot taken from an internet security monitoring site showing the locations of the command centers of ZeuS – a botnet that has been actively compromising computer networks all around the globe since 2009 …

The Zeus botnet has been actively compromising computer networks all around the world since 2009.

(ZeuS is a botnet that has been actively infecting computer networks all around the globe since 2009. Screenshot image:

The botnet attacks on WordPress sites are well organized and highly distributed. Over 90,000 IP addresses were identified by a number of hosting companies just in the initial attack, when millions of attempts to force their way into WordPress user administration areas occurred. The attack continued after this, with over 30,000 WordPress sites and blogs being hacked every day.

Coverage of this brute-force botnet attack was widely reported in all the major webhosting companiesand leading technology media publications, such as Forbes, TechNews Daily, BBC News, Tech Crunch, PC Magazine, and even on the official US Department of Homeland Security website …

WordPress is often the target of attacks by hackers, due to its global popularity

(WordPress is the world’s most popular CMS making it an obvious target for hacking attacks)

Does This Mean We Shouldn’t Use WordPress Anymore?

No. In fact, there are many great reasons why you should choose WordPress if you are concerned about the security of your website.

We explain what makes WordPress a very secure web platform in this article: Can You Build A Secure Business Online Using WordPress?


It’s important to note that, in the case of April 2013 mass brute-force attack described above, there was no WordPress vulnerability being exploited (the same script was also attacking sites built using other platforms like Joomla).

Mike Little, the co-founder of WordPress, said this about the brute force attacks:

It is a “simple” script that attempts to login using the admin login and a generated password. So if your password is too short or based on dictionary words it will be guessed and then the script can login legitimately and do whatever it wants including installing scripts (as plugins) or editing files. The attack tries to guess your password, if it succeeds, the most secure site in the world is wide open because they have your password.


Protecting Your WordPress Website From Brute Force Attacks – 10 Security Checks

Every web site with a security vulnerability can can provide an opportunity to hackers. A vulnerable site not only offers newbie hackers opportunities to improve their skills and win “respect” from their peers, but it can also acts as a valuable platform for launching distributed attacks, spreading malware and as a source of information theft.

If someone can hack into and gain access and control of your site, your web site can then be employed as a “bot” in a planned cyber-attack against other valuable websites.

Additional undesirable impacts of being hacked include getting blacklisted by Google, having stealthy spam links promoting things like viagra, porn, etc. in your content, redirecting visitors to phishing sites, drive-by downloads (adding malware on your visitors’ computers), and many other nasties.

The harsh reality is that brute-force software bots are most likely searching for weaknesses and trying to hack into your website or blog as you are reading this article at this very moment. Whether they can successfully break into your site will depend on how hard you have made things for hackers to keep persisting until they work out how to get access, or give up and go look for a less protected target.

How Much Information About Your Site Are You Broadcasting To Hackers?

Do you own a WordPress site? If so, visit a site like and run your website through their WordPress security scan …

WP Security Check(Website Security Scan Source:

You will see that the check will display various results and information about your website …

Website Security Scan

(WordPress security check results. Product image source:

It should be obvious after using this tool that if you can access all of this information, then hackers can too.

Hackertarget - WordPress Security Scan(Screenshot source:

Being able to see what version of WordPress you are using, which plugins and themes you have installed on your site, and which files have been uploaded to certain directories on your server can be potentially useful information to hackers, as this can inform them about potential vulnerabilities, especially in older versions.

If your website is driven by WordPress and you’re not proactive steps to toughen up your site, we can practically guarantee that, at some point in time, your site will be hacked, or at least targeted by bots, because these attacks are systematically targeting WordPress sites around the world!

When a website or blog gets compromised, webmasters can find themselves “locked out” of their own site, or notice that their content has been vandalized or that everything has been entirely wiped out. Typically, compromised sites will be infected with malicious software or viruses without the owner even being aware that a security breach has occurred.

To avoid the heartache (and potential loss of valuable business data) that comes with discovering that your web site has been hacked into, below are ten essential and effective security measures that will help to prevent your WordPress site from brute force botnet attacks.


Note: Some of the steps below need some technical understanding of how to modify core WordPress and server files. If you have no web skills, or don’t want to mess around with code on your site, then ask your web host or search for a professional WordPress technical provider in our WordPress Services Directory.


Security Measure #1 – Get In Touch With Your Hosting Company

Get in touch with your webhosting service provider and ask them exactly what systems they have put in place to help prevent your site from brute force attacks, and what they do to ensure that your files and data are being regularly backed up.

Make sure that your host is backing up your server files and that, if disaster strikes, you can quickly and easily recover your files and data.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Regularly Updated

You should never rely only on your webhosting provider for your site backups. Instead, learn how to manage your WordPress site or pay someone to get this service done for you and develop a habit of performing a complete site maintenance routine on a frequent basis (e.g. daily, weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

  • All unnecessary data and files are deleted,
  • All WordPress files and data are free of errors, optimized and backed up,
  • All software, themes and plugins are up-to-date,
  • etc …

A full WordPress maintenance routine looks like this …

Maintaining your WordPress site regularly backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site frequently backed up and updated is vitally important for WordPress security. Screenshot image:

Again, we cannot stress enough how vitally important maintaining your WordPress website or blog frequently backed up and up-to-date is. WP site maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. If you don’t want to learn how to do WordPress site maintenance yourself, pay a professional to do it but make sure this gets done. Backing up your website is the second most important thing you must do after making sure that you still have a pulse!

If you don’t want to perform manual backups, there are many free and paid plugins you can use. You can read about a WordPress backup plugin that can automate your site backups here: Back Up, Copy & Keep Your WP Site Protected With Backup Creator WP Plugin

Security Measure #3 – Make Sure That Your Username Is Not “Admin”

The mass brute force attack on WordPress sites was mostly an attempt to compromise site administrator panels by exploiting WP installations that used “admin” as the account name.

For security purposes, avoid installing a WordPress site with the username “admin”. This is the first area of potential vulnerability hackers will test. If your site’s username is “admin”, you should change it immediately.

For a step-by-step tutorial on how to change your login username, go here: Changing Your WP Admin User Name To Another Username

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when malicious software persistently tries to guess the right combination of password and username characters that will unlock your website.

Unless some measure is put into place to prevent the brute force attack from happening (see further below for a couple of simple and effective ways to do this), the “bot” will just continue to attack your site until it eventually “cracks” the code.

Passwords that are easy to guess, therefore, make very easy targets for hackers. Make sure that you change your password combination to a string containing at least 8 characters long, and that includes upper and lowercase letters, and add a few “special” characters (^%$#&@*).

Practical Tip

Roboform is a password management program that lets you easily create different secure login passwords …

Roboform is a password management tool you can use to generate different secure login passwords(You can use a password management software tool like Roboform to help you generate really secure passwords)

We have created a simple tutorial that shows you how to change your WordPress password here: Changing Passwords In WordPress

Security Measure #5 – Prevent Access To Your WP Config File

The wp-config.php file contains information about your website’s database and is used to define advanced WordPress options.

WP Config file

(WordPress WP Config file)

If a hacker breaks into your website, they will try to access your wp-config.php file, because this file contains important information about your site’s database, security keys, etc. Getting access to this information would allow them to change anything in your database, create a user account, upload files and take control of your site.

In order to protect your WordPress site from attacks and even being used as part of a bot net, therefore, prevent people from being able to easily get to your wp-config.php file. This requires knowing how to edit database information, move files around in your server and changing access permissions.

Security Measure #6 – Delete Or Rename Unnecessary Blog Installation Files

Delete or rename your install.php, upgrade.php and readme.html files.

You can remove these files after installation. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Keep Your WordPress Installation, Themes And Plugins Up-To-Date

Hackers look for vulnerabilities in previous versions of WordPress that can be exploited, including outdated versions of WP themes and plugins.

Ensure that all of your files, plugins, themes, etc. are always up to date.

Security Measure #8 – Disable Your WordPress Theme Editor

WordPress comes with a built-in editor feature that allows the site administrator to edit theme and plugin code inside the dashboard.

You can access the WordPress Theme Editor by selecting Appearance > Editor from the main menu …

WordPress Theme Editor Menu

(The WordPress theme editor can be accessed via the admin menu)

This means that anyone logging into your site can view and edit your WP theme template files, and cause mayhem on your site.

If you want to prevent unauthorized people from being able to access the WordPress Theme editor, you will need to disable it. This can be done by adding code to your wp-config.php file.

Security Measure #9 – Protect The Site’s Uploads Folder

The “uploads” directory stores all the media files that get uploaded to your site.

Normally, this folder is visible to all users online. All someone has to do to view all of the contents in the “uploads” folder is visit your directory using their browser …

(WordPress has an uploads directory where media content is stored)

(WordPress uploads directory)

If any directories in your website have weaknesses or vulnerabilities that can be exploited by malicious users, someone could upload unauthorized file types or compromise the security of your site.

Protecting your directories will prevent unauthorized people from viewing your ‘uploads’ folder and other important directories. This can be done using plugins, setting file permissions, uploading a blank index.php file (this is literally an empty file called “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are not sure about what to do.

Security Measure #10 – Install WordPress Security Plugins

There are a number of great WordPress security plugins available that will address common security issues faced by WordPress website owners, such as preventing hackers from gaining access to vital areas of your site, protecting your site from malicious scripts, preventing injections of code into files, etc.

Most WordPress plugins address some but not all areas of WordPress security. One WordPress security plugin that does a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your website files and causing damage to your site is SecureScanPro.

SecureScanPro - WP total security software

(SecureScanPro – WordPress total security plugin)

SecureScanPro is easy to install and easy to use, and does a great job of fixing most of the security issues that WordPress users need to address.

Another security plugin you may want to look at using is BlogDefender.

Blog Defender Security Solution For WordPress Websites & Blogs

Blog Defender(Blog Defender WordPress Security Solution)

This product is a suite of WordPress security video tutorials, WordPress plugins and tools, plus a WordPress security PDF/DOC file.

BlogDefender scans you WordPress installation for potential security holes …

Blog Defender Security Plugin For WordPress Web SitesAnd lets you quickly fix these …

Blog DefenderIf you don’t want to buy a security plugin like SecureScanPro or BlogDefender, you can use various free WordPress plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a very secure platform, but neglecting basic maintenance tasks like keeping your WP installation, plugins and WP themes up-to-date, tightening file and data security and taking other necessary precautions can expose your site to attacks by hackers and bots.

No matter what type of business you run or plan to run online and how small you think your web presence is, you cannot ignore the importance of web security.

As one last reminder of the importance of keeping your websites protected, below is the advice given by a web security expert to all WordPress users after the large-scale brute force attacks on WordPress in April 2013 …

Owners of websites based on WordPress CMS must improve at least basic security settings and implement best practices such as the use of robust passwords and the accurate management of “admin” accounts.

Pierluigi Paganini, Chief Information Security Officer, Security Affairs


As you can see, website security is of the utmost importance if you run a WordPress site. Hopefully, the information in this article will help prevent brute-force attacks on your WordPress site. If you need any further help or assistance with WordPress security, please seek help from a professional WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

Also, please remember to subscribe to to be notified when we publish new articles on WordPress security and tutorials about new WordPress security plugins and solutions.


"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie


Originally published as How To Protect Your WordPress Site From A Brute-Force Attack.