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 SecurityBeing the world’s most popular CMS makes WordPress a target for hacking attacks.

In early 2013 a worldwide brute force attack struck WordPress installations on almost every web host in existence.

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

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

Brute-Force Attacks – An Overview

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 use to try and break into WordPress sites is by trying to guess the site admin’s login username and password. To attempt this, hackers use scripts and software that automatically tries to guess hundreds of login possibilities in minutes.

If you’re using easy-to-guess login details, your website could be an easy target for hackers.

This is called a “brute-force” login attack.

Botnet Definition

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/botnet)

A “Botnet” is a network of computers that have been infected with malicious code, which can then be controlled remotely as a group, often without the unsuspecting computer owners’ knowledge or awareness.

Botnets are normally used used to send out mass spam emails from the infected computers of unsuspecting users.

Below is a screenshot taken from an online 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 …

ZeuS is a botnet that has been actively compromising computer networks all around the world since 2009.

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

The ongoing botnet attacks are well organized and highly distributed. Over 90,000 IP addresses were identified by several webhosting companies in the initial attack alone, when millions of attempts to force their way into WordPress user admin areas occurred. The large-scale brute force attacks continued after this, with over 30,000 WordPress blogs being hacked every day.

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

Being the world's most popular CMS makes WordPress a target for hacking attacks

(WordPress powers millions of websites and blogs worldwide, which makes it a frequent target for hacking)

Does This Mean WordPress Is Not Secure And We Should Stop Using It?

No. In fact, there are many great reasons why you should continue using WordPress if you are concerned about the security of your online presence.

We explain what makes WordPress a very secure platform for websites in this article: How Secure Is WordPress? What Every Business Owner Needs To Know

Important Info

It’s important to note that, in the case of the brute force attack described above, was no specific vulnerability in WordPress being exploited (the same script was also targeting sites built using other web applications like Joomla).

Mike Little, one of the co-founders of WordPress with Matt Mullenweg, said this about the botnet 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 Being Brute-Force Attacked – Ten Security Measures

Every site with a security vulnerability has some degree of potential value to hackers. No blog is guaranteed immunity from a cyberattack. Large, medium and small business web sites, personal blogs, government web sites … even websites owned by online security and anti-hacking experts can and have been targeted.

If a malicious user can exploit a software vulnerability in your security, the website can then be used to target larger and more valuable websites.

Additional undesirable effects of having your website hacked and your site security compromised include getting blacklisted by Google, having spammy links promoting things like gambling, porn, etc. inserted in your content and page title and descriptions, redirecting visitors to phishing sites and other websites, data exfiltration (stealing customer details or Personal Identifiable Information from your web applications), and many other nasty things.

The reality is that software-driven bots are very likely trying to break into your website or blog right now. Whether they will achieve this or not, will depend on how hard you can make things for hackers to continue persisting until they can work out how to get access, or are forced to give up and decide to look for a less secure target.

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

Does your website run on WordPress? If so visit and run your website through their WordPress security check …

Website Security Check(Hackertarget – WP Security Check Screenshot:

You will see that the scan will display various results and information about your site setup …

WP Security Scan

(Hackertarget – WordPress security check results. Product image:

It should be obvious after using this tool that if you can access all of this information about your WordPress site, then so can hackers.

Website Security Check(Screenshot: Blog Defender)

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

If your website runs on WordPress and you’re not proactive steps to bullet-proof your site, then we can practically guarantee that, at some point, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically targeting WordPress installations worldwide!

Whenever a website or blog is hacked, site owners will discover much to their dismay that they have been “locked out” of their own site, or notice that their content has been altered or that everything has been entirely wiped out. Typically, most compromised sites will become infected with malicious software or viruses without the owner’s knowledge or awareness.

To avoid the heartache of having your site being hacked into, we have listed below 10 essential and effective security measures that will help to prevent your WordPress site from being brute force attacked.


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


Security Measure #1 – Contact Your Host

Get in touch with your web host and ask them exactly what security measures are in place to help prevent your site from being attacked, and what is done to make sure that your WordPress sites get backed up.

Make sure that your hosting provider is backing up your server files and that, if disaster strikes, you can quickly and easily get your files and data back.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Website Regularly Updated

Never rely only on your webhosting provider for site backups. Instead, learn how to maintain your WordPress site or get this done for you and maintain a habit of performing a full WordPress site maintenance routine on a regular basis (e.g. weekly, monthly, etc …)

A complete WordPress maintenance routine ensures that:

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

A full WP site maintenance routine looks like this …

Maintaining your WordPress site regularly backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP website backed up and updated is vitally important for WordPress security. Image source:

Again, we cannot stress enough how important maintaining your WordPress web site backed up and updated is. WP maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website. If you do not 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 site is the next most important thing you should do after making sure that your heart is still beating!

If you don’t want to perform manual backups, there are many free and paid plugins you can use. Learn about a WordPress backup plugin that can fully automate your backup process here: Backup, Clone & Protect Your WordPress Web Sites With Backup Creator Plugin For WordPress

Security Measure #3 – Do Not Use “Admin” As A Username

the worldwide brute-force botnet attack on WordPress is mostly an attempt to compromise site administrator panels by exploiting installations using “admin” as their user name.

For security reasons, avoid setting up a WordPress site with the username admin. This is the first thing hackers will test. If your site’s user name is “admin”, you will should change it immediately.

For a detailed tutorial that shows you how to change your WordPress username, go here: How To Change Your Admin User Name In WordPress To Another User Name

Security Measure #4 – Make Sure Your Password Is Hard To Guess

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

Unless you put some measure in place to block the brute-force attack (see further below for a couple of effective suggestions for doing this), the “bot” will just keep attacking your site until it eventually breaks into your admin area.

Weak passwords, therefore, become very easy targets for botnets. Make sure that you change your password to something containing at least 8 characters long, with both upper and lowercase letters, combined with “special” characters (^%$#&@*).

Useful Tip

Roboform is a password management program you can use to help you generate strong passwords …

Roboform is a password management software you can use to generate really secure passwords(Roboform is a password management tool that lets you create different secure passwords)

For a tutorial for non-technical WordPress admin users that shows you how to change your admin password, go here: How To Change Your Login Password

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

The wp-config.php file allows WordPress to communicate with the database to store and retrieve data and is used to define advanced options for WordPress.

wp-config.php file

(WordPress WP Config file)

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

To protect your WordPress site from being attacked and even being used as part of a bot net, therefore, prevent your wp-config.php file from being easily accessible. 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 Installation Files

Rename or delete your install.php, upgrade.php and readme.html files.

These files are completely unnecessary after installation and can be removed. If you don’t want to remove these files, then just rename them.

Security Measure #7 – Keep Your WordPress Site, Themes & Plugins Up-To-Date

Hackers search for vulnerabilities in earlier versions of WordPress that can be exploited, including out-of-date versions of plugins and themes.

Make sure to always keep your installation files, plugins, themes, etc. up-to-date.

Security Measure #8 – Disable Your Theme Editor

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

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

WordPress Theme Editor Menu

(The WordPress theme editor is accessible via the main menu)

The WordPress theme feature lets anyone accessing your blog view and modify your WP theme templates, or create havoc on your site.

To prevent unauthorized people from accessing the WordPress Theme editor, you will need to disable it. This can be done by editing your wp-config.php file.

Security Measure #9 – Prevent Access To The Site’s Uploads Folder

The “uploads” directory contains all the media that gets uploaded to your WordPress site.

By default, this folder is visible to anyone online. All someone has to do to see the contents stored in the “uploads” directory is navigate to your directory using their web browser …

(WordPress has an uploads directory where all of your media files are stored)

(WordPress uploads directory)

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by hackers or malicious users, this can threaten the security of your website.

Protecting your directories will prevent online users from accessing 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 a file with nothing in it named “index.php”) to your uploads directory, and so on. Again, it’s best to get professional help if you are not sure about what to do.

Security Measure #10 – Security Plugins

There are a number of WordPress security plugins available that specifically address common security issues WordPress site owners face, such as preventing hackers from accessing vital areas of your site, protecting your website from malicious software, preventing injections of code into files, etc.

Many WordPress plugins address some but not all areas of WordPress security. One security plugin that seems to do a comprehensive job of scanning, fixing and preventing potential issues that could lead to hackers accessing your site files and damaging your site is SecureScanPro.

SecureScanPro - security plugin for WordPress

(SecureScanPro – total security software for WordPress)

SecureScanPro is easy to install and easy to use, and fixes 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

Blog Defender(Blog Defender)

Blog Defender is a package of WordPress security video tutorials, WordPress plugins and tools, plus WordPress security documentation in PDF and DOC formats.

BlogDefender shows you where the security holes in your WordPress site are …

Blog DefenderAnd then shows you how to fix these quickly, easily and inexpensively …

Blog Defender Security Solution For WordPress Web SitesIf you don’t want to purchase a security plugin like SecureScanPro or BlogDefender, then use various free WP plugins, such as Limit Login Attempts

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting essential maintenance tasks like keeping your WP core files, WP plugins and themes updated to their latest versions, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

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

As one last reminder of the importance of keeping your websites protected, below is the advice given by an expert on web security to all WordPress users after the global brute-force attacks on WordPress in 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, this information has shown you what to do to keep your WordPress site protected from brute force attacks. If you need any further help or assistance with WordPress security, please consult a professional WordPress security specialist, or search for a professional WordPress technical provider in our WordPress Services Directory.

Also, do yourself a favor and subscribe to to receive notifications via email when we publish new articles and tutorials on WordPress security and reviews of new WordPress security plugins.


"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)


Translate »