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 SecurityWhen you are the world’s leading CMS platform and the preferred online publishing platform used by millions of businesses and loved by thousands of website developers and website designers, it’s inevitable that at some point in time, WordPress will come under attack from hackers wanting to score a “big win”.

In early 2013, WordPress installations around the world were subjected to a worldwide brute-force attack.

These attacks were caused by networks of infected computers programmed to attack other vulnerable installations, also commonly known as “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)

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 with software programs and scripts that automatically tries to guess hundreds of login permutations in minutes.

If you’re not using strong usernames or unguessable passwords, your site can be an easy target for hackers.

This is called a “brute force” login attack.

What Are Botnets

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 software, which are then controlled remotely as a group, often without the unsuspecting computer owners’ knowledge.

Botnets are regularly used to blast out mass spam emails.

Below is a screenshot taken from an internet security monitoring site 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” …

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

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

These were well organized and highly distributed attacks. Over 90,000 IP addresses were identified by a number of webhosting companies in the initial attack alone, when the web was flooded with millions of attempts to force their way into WordPress users admin areas. The large-scale attack continued after this, with over 30,000 WordPress sites being hacked every day.

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

Powering millions of websites worldwide makes WordPress a target for attempted attacks by malicious users

(WordPress powers millions of websites and blogs worldwide, making it a frequent target for hackers)

Does This Mean We Shouldn’t Use WordPress Anymore?

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

To understand what makes WordPress a very secure platform for websites, read this article: Are Open Source Platforms Like WordPress Secure?

Useful Info

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

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


Preventing Your WordPress Site From Brute-Force Attacks – Ten Security Measures

You may think that your website provides no value to hackers, but the reality is that every website is valuable to a malicious user.

If hackers can discover a software weakness in your security, your blog can then be used as a “bot” to attack other valued websites.

Additional undesirable impacts of having your website hacked and your site security compromised include getting blacklisted by Google, having stealthy spam links advertising things like viagra, cheap offers on brand names, etc. in your content, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The harsh reality is that brute-force software bots are most likely searching for exploits and trying to break into your site as you are reading this article right now. Whether they can get in successfully or not, will depend on how hard or easy you will make it for them to keep trying until they work out how to get in, or are forced to give up and decide to look for a less secure target.

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

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

Hackertarget - Website Security Scan(WP Security Check Screenshot image:

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

Hackertarget - Website Security Check

(Hackertarget – website security scan results. Screenshot:

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

Website Security Scan(Screenshot image:

The ability 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 can all be potentially valuable information to hackers, as this can inform them about exploitable vulnerabilities, especially where site owners haven’t updated their files.

If your website is powered by WordPress and you’re not preventive steps to bolster the security of your site, then we can practically guarantee that, at some time in the near future, your site will be hacked, or at least targeted by bots, because these brute force attacks are systematically hitting WordPress sites around the world!

Whenever a website gets broken into, site owners can discover much to their dismay that they have been “locked out” of their own site, or notice that their files have been modified or even entirely wiped out. Typically, compromised sites will be infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache of having your site being hacked into, we have listed below ten simple, yet essential and effective security measures that will help to protect your WordPress site from being attacked by brute force hackers.


Note: A few of the recommended steps below require some technical skills to modify core WordPress or server files. If you lack these technical skills, or don’t want to mess around with file code, then ask your web host or a professional WordPress technical provider for assistance.


Security Measure #1 – Contact Your Host

Contact your webhosting service provider and ask them what systems are in place to help prevent your site from being attacked, and what they do to ensure that your server files and data get backed up.

Check that your host is backing up your sites and that, if anything goes wrong, you can quickly and easily recover your files and data.

Security Measure #2 – Perform Full WordPress Backups And Keep Your Site Regularly Maintained

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

A proper WordPress maintenance routine ensures that:

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

A proper WP site maintenance routine looks like this …

Maintaining your WP installation frequently backed up and up-to-date is vitally important for WordPress security.(Maintaining your WP website or blog fully backed up and updated is vitally important for WordPress security. Screenshot:

Again, we cannot stress enough how vitally important it is to maintain your WP installation completely backed up and updated. WP site maintenance is not hard to do or time-consuming, but it must be done to ensure the security of your website or blog. If you don’t want to learn how to do WordPress site maintenance yourself, get someone else to do it but make sure this gets done. Backing up your website is the second most important thing you should do after making sure that you are still breathing!

If you don’t want to back up your files manually, there are a number of WordPress plugins you can use. You can read about a WordPress backup plugin that can fully automate your site backups here: Back Up, Clone & Protect Your WP Web Sites With Backup Creator WordPress Plugin

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

The brute-force botnet attack on WordPress is mostly attempting to compromise website admin panels by exploiting WordPress sites using “admin” as the account name.

For reasons of website security, don’t install a WordPress site with the username admin. This is the first thing hackers will test. If your blog’s username is “admin”, you will should change it immediately.

We have created a simple tutorial for non-technical WP admin users that shows you how to change your WordPress username here: Changing Your WordPress Admin User Name

Security Measure #4 – Your Password

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

Unless you put some measure in place to prevent the brute-force attack (see further below for a couple of simple and effective ways to do this), the “bot” will just continue attacking your site until it eventually gets access.

Weak passwords, therefore, make really easy targets for hackers. Make sure that you change your password to something containing at least 8 characters long, with upper and lowercase letters, and add a few “special” characters (^%$#&@*).


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

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

We have created a simple step-by-step tutorial for admin users that shows you how to change your login password here: Changing Your Password

Security Measure #5 – Protect Your wp-config.php File

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

wp-config.php file


If a hacker breaks into your WordPress site, they will typically search 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 being attacked and even being used as part of a bot net, therefore, you must 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 Installation Files

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

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

Security Measure #7 – Upgrade Your WordPress Blog, Plugins & Themes To Their Latest Version

Hackers are always on the lookout for vulnerabilities they can exploit in older versions of WordPress, including outdated versions of plugins and themes.

Make sure to keep all of your files, themes, plugins, etc. up-to-date.

Security Measure #8 – Disable Your Theme Editor

WordPress installations come with a built-in editor feature that lets you edit theme and plugin code inside the dashboard area.

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

WordPress Theme Editor Menu

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

This means that anyone logging into your site can view and change your WordPress files, or cause mayhem on your site.

If you want to prevent people from accessing 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 WordPress Uploads Folder

The WordPress “uploads” folder stores all the media that gets uploaded to your blog.

Normally, this folder is visible to anyone online. All someone has to do to view the contents in the “uploads” folder is visit your directory using a web browser …

(WordPress uploads folder)

(WordPress has an uploads folder where your media files are stored)

If any files stored in his folder have vulnerabilities that can be exploited by hackers, anyone could upload unauthorized file types to 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, 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 hire a professional if you are unsure about what to do.

Security Measure #10 – WordPress Security Plugins

Several WordPress security plugins are available that will address most security issues faced by WordPress website owners, such as preventing hackers from accessing vital areas of your site, protecting your website from botnets, preventing unauthorized file uploads, etc.

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

SecureScanPro - total security software for WordPress

(SecureScanPro – WP security software solution)

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

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

Blog Defender Security Product Suite For WordPress

Blog Defender(Blog Defender Security Plugin)

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

BlogDefender shows you where potential security weaknesses in your web site are …

Blog Defender Security SolutionAnd lets you fix these quickly …

Blog Defender Security Plugin For WordPressIf you don’t want to buy 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 very secure web platform, but neglecting simple maintenance tasks like updating your WordPress installation, plugins and WP themes, tightening file and data security 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 ignore.

As one last reminder, below is the advice given by a 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, website security is very important if you run a WordPress site. Hopefully, this article has provided you with the initial steps you need to take 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 professional WordPress technical provider in our WordPress Services Directory.

Also, don’t forget to subscribe to to receive notifications via email whenever we publish new tutorials on WordPress security and tutorials about WordPress security plugins and solutions.


"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill,

Disclaimer: This site has no association with WordPress, Automattic, or any WordPress-related products mentioned or reviewed on this website. We may derive affiliate commissions from purchases of any services and/or products advertised, endorsed or linked to this website. All product images are the copyright of their respective owners and are being used only for training or illustrative purposes.


Have you found this post useful? Feel free to share this post with anyone thinking of starting a business online using the links below.

Author: Martin Aranovitch

Martin Aranovitch is the founder of and the author of The Small Business Digital Manager. provides hundreds of FREE detailed step-by-step tutorials that will teach you how to use WordPress to grow your business online at minimal cost with no coding skills required!

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