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.

WP SecurityWhen you are the world’s leading content management system and the online publishing platform of choice used by millions of websites and loved by thousands of web developers and web designers, it’s inevitable that at some point in time, WordPress will become an easy target for attacks by hackers.

In April 2013 a global brute-force attack hit WordPress installations across almost every host server in existence around the world.

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

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

What Is A Brute Force Attack?

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’s administration login username and password. This can be done with software tools and scripts that can work through hundreds of possible login combinations in minutes.

If you’re using weak login details, your website could be an easy target for hacking attempts.

This is called a “brute force” login attack.


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)

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 computer owners’ knowledge.

Botnets are regularly used to blast out mass spam emails.

Below is a screenshot taken from a site that monitors online security showing the locations of the command centers of a botnet that has been actively compromising computer networks all around the globe since 2009 called “Zeus” …

The Zeus botnet has been actively infecting 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. Screenshot source:

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

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

Powering millions of sites worldwide makes WordPress an obvious target for hackers

(Powering millions of websites and blogs worldwide makes WordPress an obvious target for hackers)

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

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

We explain why WordPress is a secure platform for websites in this article: Is WordPress A Secure Platform For Websites?


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

Mike Little, the co-founder of WordPress, made this comment 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.


How To Prevent Your WordPress Blog From Being Brute Force Attacked – Ten Security Checks

You may think that your website has nothing to offer to hackers, but the reality is that to a hacker, all websites provide an opportunity to gain some benefit at your expense.

If hackers can exploit a security vulnerability, your blog can then be employed as a “bot” to attack larger and more valuable web sites.

Additional undesirable consequences of having your site hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links promoting things like casinos, discounted fashion, etc. inserted in your content, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasties.

The harsh reality is that hackers are probably trying to break into your blog right now. Whether they can do this successfully or not, depends on how difficult you can make things for hackers or bots to keep trying until they find a way to get access, or give up and decide to look for an easier target.

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

If you visit a site like and run your website through their WordPress security scan …

Hackertarget - Website Security Scan(Hackertarget – Website Security Check Screenshot source:

You will see that the test will yield a number of results and information about your site …

WP Security Scan

(WordPress security scan results. Source:

It should be obvious after using the tool shown above that if you are able to access all of this information about your site, hackers can too.

Hackertarget - Website Security Check(Product image: Blog Defender)

Being able to see what version of WordPress you are using, which plugins and themes you have installed, and which files have been uploaded to certain directories in your site can be potentially useful information to hackers, as this can inform them about any potential security weaknesses, especially where the owners haven’t updated their software versions.

If your site or blog is driven by WordPress and you’re not precautionary steps to toughen up your site, then it’s practically guaranteed 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 around the world!

When a website is compromised, site owners will find themselves “locked out” of their own site, or notice that their files have been vandalized or even that their content has been entirely wiped out. Often, compromised sites will be infected with malicious software or viruses without the owner even being aware that a security breach has taken place.

To avoid the heartache and aggravation of discovering that your website or blog has been hacked into, below are 10 essential and effective security checks that will help to protect your WordPress site from being attacked by brute-force hackers.

Important Info

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


Security Measure #1 – Get In Touch With Your Hosting Service Provider

Get in touch with your webhosting service provider and ask them what security measures have been put into place to protect your site from being attacked, and what they do to ensure that your site files are regularly being backed up.

Check that your host regularly backs up your server files and that, if disaster strikes, you can easily get your files back.

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Or Blog Regularly Maintained

Never rely on your hosting service provider for your site backups. Instead, learn how to maintain and manage your WordPress site or pay someone to get this service done for you and develop a habit of performing a complete WordPress site maintenance routine frequently (e.g. weekly, fortnightly, etc …)

A complete WordPress maintenance routine ensures that:

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

A proper WordPress site maintenance routine looks like this …

Maintaining your WordPress web site completely backed up and updated is vitally important for WordPress security.(Maintaining your WordPress web site backed up and updated is vitally important for WordPress security. Screenshot source:

Again, we cannot stress enough how important maintaining your WP website or blog fully 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 WP maintenance yourself, get someone else to do it but make sure it gets done. Backing up your website is the next most important thing you must do after making sure that you are still breathing!

If you don’t want to back up your site manually, there are many WordPress plugins you can use. Learn about a WordPress backup plugin that can automate your backup process here: Backup, Clone & Protect Your WP Website With Backup Creator WordPress Plugin

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

the worldwide brute force attack on WordPress sites was mostly an attempt to compromise website administrator panels and gain access to the site by exploiting sites that used “admin” as their user name.

For security reasons, avoid installing sites with the username admin. This is the first thing hackers will test. If your site’s username is admin, change it immediately.

For a simple step-by-step tutorial for non-technical WordPress users that shows you how to change your admin username, go here: Changing Your WP Admin User Name To Another User Name

Security Measure #4 – Change Your Password

A “brute force” attack occurs when a malicious script persistently tries to guess the right combination of characters in a password and username that will give the hacker entry to your site.

Unless some measure is put into place to block the brute-force attack from happening (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, are very easy targets for bot attacks. Make sure that you change your password to something that is at least eight characters long, and that includes upper and lowercase letters, combined with “special” characters (e.g. %, #, &, etc).

Practical Tip

Roboform is a password management tool you can use to generate secure login passwords …

You can use a password tool like Roboform to generate really secure passwords(You can use a password software tool like Roboform to generate difficult passwords)

We have created a simple step-by-step tutorial that shows you how to change your admin password here: What To Do If You Need To Change WordPress Passwords

Security Measure #5 – Prevent Access To The wp-config.php File

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

WP Config file

(wp-config.php file)

If a hacker breaks into your WordPress site, they will try to access the wp-config.php file, because this file contains your database details, 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.

In order to protect your WordPress site from attacks and even being used as part of a bot net, therefore, prevent your wp-config.php file from being easily accessed. 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 the install.php, upgrade.php and readme.html files from your server.

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

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

Hackers look for vulnerabilities they can exploit in earlier versions of WordPress, including outdated versions of WordPress themes and plugins.

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

Security Measure #8 – Disable The Theme Editor

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

In WordPress, you can access your WordPress Theme Editor by selecting Appearance > Editor in the main menu …

WordPress Theme Editor Menu

(The WordPress theme editor is accessible using the admin menu)

The WordPress theme editor allows anyone accessing your site to view and edit your WP theme template files, and create mayhem on your site.

To prevent people from accessing your 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 WordPress “uploads” folder stores all the media that gets uploaded to your blog.

Normally, this folder is visible to online users. All a person needs to do to view all of the contents stored in your site’s “uploads” directory is visit your directory using a web browser …

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

(WordPress uploads folder)

If any files stored in his folder have vulnerabilities that can be exploited by hackers, this could compromise the security of your website.

Protecting your directories will prevent online users from viewing your ‘uploads’ folder and other important directories. This can be done using plugins, setting file permissions, adding a blank index.php file (this is literally an empty file named “index.php”) to your uploads directory, and so on. Again, it’s best to ask help from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

There are some great security plugins for WordPress available that specifically address many common security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital information about your site, protecting your site from botnets, preventing injections of code into files, etc.

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

SecureScanPro - security software solution for WordPress

(SecureScanPro – WordPress complete security software solution)

SecureScanPro is easy to install and easy to use, and fixes most of the security areas that WordPress users need to address.

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

Blog Defender

Blog Defender Security Suite For WordPress(Blog Defender Security Plugin For WordPress Web Sites)

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

BlogDefender shows you where the security holes in your website are …

Blog DefenderAnd lets you fix these quickly and easily …

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

Limit Login Attempts - WordPress Security Plugin

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

Regardless of the type of business you run or plan to run online and how small you think your web presence is, you simply cannot ignore the importance of securing your web site.

As one last reminder, below is the advice given by a website security expert to all WordPress users following the mass 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 very important if you run a WordPress site. Hopefully, the information in this article 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 WordPress security specialist, or search for a WordPress technical provider in our WordPress Services Directory.

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


"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams,