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 SecurityWordPress is frequently the target of malicious attacks by hackers, due to its popularity.

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

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

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

Brute-Force Attacks – Definition

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)

There are many methods hackers use to try and break into a WordPress site. One of these is by trying to guess the site’s administration login username and password. This can be done using software programs that can guess hundreds of possible logins in minutes.

If you’re using obvious user names and passwords, your website can be easily hacked by the script’s persistent attempts to guess your site’s login details.

This is called a “brute force” attack.

What Is A Botnet?

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 private computers that have been infected with malicious code or software, which can then be controlled remotely as a group, typically without the computer owners even being aware of this.

Botnets are regularly used to send mass spam emails.

The screenshot below was taken from a site that monitors online security showing the locations of the command centers of ZeuS – a botnet that has been actively infecting computer networks all around the world since 2009 …

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

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

These ongoing botnet attacks are well organized and highly distributed. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack alone, when millions of attempts to force their way into WordPress users admin areas took place. The mass attack then continued, with over 30,000 WordPress sites being hacked per day.

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

WordPress often is targeted by hackers

(Being the world’s most used CMS makes WordPress a target for malicious attacks by hackers)

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

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

To understand why WordPress is a secure platform for websites, see this article: Is WordPress A Secure Platform For Websites?


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

Mike Little, the co-founder of WordPress with Matt Mullenweg, made the following comment 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.


Preventing Your WordPress Blog From Brute Force Attacks – Ten Security Measures

Every website with a security vulnerability has value to hackers. A compromised website presents malicious users with a platform to launch DDoS attacks, spread malware and use your site to defraud others.

If hackers can break in and gain control of your blog, that website can then be used to target other highly-valued sites.

Additional undesirable results of being hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links advertising things like online meds, cheap offers on brand names, etc. in your content, malicious redirects to phishing sites or other websites, drive-by downloads (adding malicious scripts on your visitors’ computers), and lots of other nasty things.

The truth is that brute-force software bots are very likely trying to hack into your site at this very moment. Whether they can get in or not, depends on how difficult you can make it for hackers or botnets to keep persisting until they discover how to get in, or give up and decide to look for a less protected target.

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

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

WordPress Security Check(Hackertarget – WP Security Check Screenshot source:

You will see that the test returns a number of results and details about your site …

Hackertarget - Website Security Scan

(Hackertarget – WordPress security check results. Product image:

It should be obvious after using the above tool that if you can see all of this information about your WordPress website, hackers can too.

WP Security Scan(Source:

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 on your server can be potentially useful information to hackers, as these can inform them about any exploitable security vulnerabilities, especially where site owners haven’t updated their sites.

If your website is powered by WordPress and you’re not taking appropriate steps to toughen up your site, it’s practically guaranteed that, at some point in time, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically targeting WordPress sites worldwide!

When a website gets hacked, blog owners can find themselves “locked out” of their own site, or notice that their files have been modified or that everything has been entirely wiped out. Typically, sites will be infected with malicious software without the owner’s knowledge or awareness.

To avoid the heartache that comes with having your website being hacked into, below are ten simple, yet essential and effective security measures that will help to protect your WordPress site from being brute force attacked.


Note: Some of the recommended measures listed below need some technical understanding of how to modify core WordPress and/or server files. If you are not technical, or don’t want to mess around with file code, then ask your web host or a professional WordPress service provider for help.


Security Measure #1 – Contact Your Webhosting Company

Get in touch with your web host and ask them exactly what security precautions have been put into place to help prevent your site from botnet attacks, and what they do to ensure that your files and data get backed up.

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

Security Measure #2 – Back Up Your WordPress Data And Files And Keep Your Website Regularly Up-To-Date

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

A full WordPress maintenance routine ensures that:

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

A complete WP maintenance routine looks like this …

Maintaining your WP installation backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP website or blog completely backed up and up-to-date is vitally important for WordPress security. Image:

Again, we cannot stress enough how important it is to maintain your WP site completely backed up and up-to-date. WordPress site maintenance is not hard 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 maintenance yourself, get someone else to do it but make sure this gets done. Backing up your site is the second most important thing you must do after making sure that your heart is still beating!

If you don’t want to back up your data manually, there are a number of plugins you can use. You can read about a WordPress backup plugin that can automate your backup process here: Back Up, Clone & Keep Your WordPress Sites 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 admin panels by exploiting WP sites using “admin” as the account name.

For security purposes, don’t install a WordPress site with the username admin. This is the first area hackers will test. If your site’s username is admin, then change this immediately.

We have created a detailed tutorial on how to change your WordPress admin username here: How To Change Your WP Username From Admin To A Different Username

Security Measure #4 – Choose Strong Passwords

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

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

Passwords that are easy to guess, therefore, make really easy targets for hackers. Make sure that you change your password to something that contains at least 8 or 9 characters long, and that includes upper and lowercase letters, combined with a few “special” characters (e.g. %, #, *, etc).


If you have trouble coming up with strong passwords or you are reluctant to set up different passwords for all of your online logins, then use a password software tool like Roboform …

You can use a password management software tool like Roboform to help you generate  passwords(You can use a password software tool like Roboform to create difficult passwords)

We have created a simple step-by-step tutorial that shows you how to change your admin password here: How To Change Your Password

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

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

WordPress WP Config file

(wp-config.php file)

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

To protect your WordPress site from attacks and even being used as part of a bot net, therefore, you must 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 – Rename Or Delete Unnecessary Installation Files

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

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

Security Measure #7 – Update Your WordPress Installation, Plugins And Themes

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

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

Security Measure #8 – Disable The Theme Editor

WordPress comes with a built-in editor that lets site administrators edit theme and plugin code from the dashboard area.

You can access your WordPress Theme Editor by selecting Appearance > Editor in your admin menu …

WP Theme Editor Menu

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

This allows anyone accessing your blog to view and edit your WordPress theme template files, or cause havoc on your site.

If you want to prevent unauthorized people from being able to access your 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 Your Site’s Uploads Directory

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

By default, this folder is visible to online users. All someone has to do to view the contents in your site’s “uploads” folder is navigate to your directory using a web browser …

(WordPress uploads folder)

(WordPress uploads directory)

If any directories in your website have vulnerabilities that can be exploited by hackers, this could become a serious threat to the security of your site.

Protecting your directories will prevent unauthorized people from accessing 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 a file with nothing in it called “index.php”) to your uploads directory, and so on. Again, it’s best to use a professional if you are unsure about what to do.

Security Measure #10 – Install WordPress Security Plugins

Some great WordPress security plugins are available that will address common security issues WordPress site owners face, such as preventing unauthorized users from gaining access to vital information about your site, protecting your site from botnets, preventing unauthorized file uploads, 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 issues that could lead to hackers accessing your files and causing irreparable damage to your site is SecureScanPro.

SecureScanPro - complete security plugin for WordPress

(SecureScanPro – WP total security software)

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

Another plugin you may want to consider using is BlogDefender.

Blog Defender Security Suite

Blog Defender Security Product Suite(Blog Defender WordPress Security Suite)

This product 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 potential security holes in your WordPress site are …

Blog DefenderAnd lets you quickly and easily fix these …

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

Limit Login Attempts - WordPress Security Plugin

WordPress is a secure platform, but neglecting simple maintenance tasks like updating your WordPress installation, WordPress plugins and themes, tightening file and data security and taking other necessary precautions can expose your site to attacks by hackers and bots.

Regardless of the kind 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 web security.

As one last reminder, below is the advice given by a web security expert to all WordPress users following the worldwide 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, WordPress security is of the utmost importance if you run a WordPress site. Hopefully, this article has shown you what to do to 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 WordPress technical provider in our WordPress Services Directory.

We also recommend subscribing to to receive notifications via email when we publish new articles on WordPress security and tutorials about new WordPress security plugins.


"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum


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