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.

Landing Pages for WordPress

WordPress SecurityWordPress powers millions of sites around the world, making it a target for malicious attacks by hackers.

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

These attacks were caused by botnets (computer networks infected with viruses and programmed to attack other installations with security vulnerabilities).

About 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 achieved with software programs that automatically tries to guess hundreds of possible login combinations in minutes.

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

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.


”Botnets” are networks of computers that have been infected with malicious scripts or code, which are then controlled remotely as a group, typically without the computer owners even being aware that this is happening.

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

The screenshot below was 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 world 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:

These were well organized and highly distributed attacks. 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 took place. The brute-force attacks then continued, with over 30,000 WordPress sites being hacked every day.

Coverage of this worldwide brute-force attack was widely reported in all the major webhosting companiesand leading technology 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 …

Being the world's most used content management system makes WordPress a target for hacking

(Powering millions of websites and blogs around the world makes WordPress a target for attempted hacking attacks)

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

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

We explain what makes WordPress a very secure platform for websites in this article: Why WordPress Is A Secure Platform For Websites –

Important Info

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

Mike Little, one of the co-founders of WordPress, made the following 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 Site From Being Brute-Force Attacked – 10 Security Measures

Every web site with a security vulnerability offers some value to hackers. An unsecured site presents hackers with a valuable resource for distributed denial of service (DDoS) attacks, spreading malware and as a source of information theft.

If a malicious user can break in and gain control of your website or blog, that website can then be used as a “bot” to attack other valued web sites.

Additional undesirable effects of having your website hacked and your site security compromised include getting blacklisted by Google, having spammy links advertising things like casinos, cheap offers on brand names, etc. in your content and page title and descriptions, malicious redirects 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 brute-force software bots are trying to break into your site as you are reading this page. Whether they will hack into your site successfully will depend on how challenging you will make things for hackers or bots to keep trying until they discover how to break in, or decide to look for a less protected target.

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

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

Hackertarget - WP Security Check

(Hackertarget – Website Security Scan Product image:

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

WP Security Check

(Hackertarget – website security check results. Image source:

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

Hackertarget - Website Security Check


The ability 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 are all potentially valuable information to hackers, as this informs them about potential holes or weaknesses, especially where site owners haven’t updated their sites.

If your site or blog is driven by WordPress and you are not precautionary 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 site is hacked, webmasters can find themselves completely “locked out” of their own site, or notice that their files have been modified or even that their content has been entirely wiped out. Typically, compromised sites will become infected with malicious scripts without the owner even being aware that this has happened.

To avoid the heartache and frustration that comes with discovering that your website has been hacked into, below are 10 simple, yet essential and effective security checks that will help to protect your WordPress site from being brute force attacked.

Useful Info

Note: A few of the measures listed below need 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 a professional WordPress technical provider for assistance.


Security Measure #1 – Contact Your Hosting Service

Get in touch with your hosting service provider and ask them exactly what measures they have put into place to protect your site from botnet attacks, and what is done to ensure that your server files and data get backed up.

It’s important to make sure that your host backs up your sites and that, if anything happens, you can quickly and easily recover your files and data.

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

You should never rely only on your host for site backups. Instead, learn how to maintain your WordPress site or get this done for you and develop a habit of performing a full site maintenance routine on a frequent basis (e.g. daily, weekly, fortnightly, etc …)

A proper WordPress maintenance routine ensures that:

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

A full WordPress maintenance routine looks like this …

Maintaining your WP site frequently backed up and updated is vitally important for WordPress security.

(Maintaining your WP installation fully backed up and up-to-date is vitally important for WordPress security. Screenshot image:

Again, we cannot stress enough how vitally important maintaining your WordPress website completely backed up and updated is. WordPress 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 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 still have a pulse!

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

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

The large scale brute-force botnet attack on WordPress sites was mostly an attempt to compromise website administrator panels by exploiting installations using “admin” as the user name.

For security purposes, don’t set up sites with the username admin. This is the first area hackers will test. If your site’s username is admin, change it immediately.

For a simple step-by-step tutorial for WordPress users on how to change your admin username, go here: Changing Your WP User Name From Admin To A Different User Name

Security Measure #4 – Change Your Password

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

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

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

Practical Tip

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

You can use a password program like Roboform to help you generate secure passwords

(You can use a password management tool like Roboform to create hard-to-crack passwords)

We have created a detailed step-by-step tutorial that shows you how to change your admin password here: What To Do If You Need To Reset Your Password In WordPress

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

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


(WP Config file)

If a hacker breaks into your WordPress site, they will look for the 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 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 being attacked and even being used as part of a bot net, therefore, you must prevent your wp-config.php file from being 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 WP Installation Files

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

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

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

Hackers look for vulnerabilities in outdated versions of WordPress that they can exploit, including out-of-date versions of WordPress themes and plugins.

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

Security Measure #8 – Disable The 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 your WordPress Theme Editor by selecting Appearance > Editor in the dashboard menu …

WordPress Theme Editor Menu

(Accessing the WordPress theme editor via the WordPress admin menu)

The WordPress theme editor feature allows anyone accessing your site to view and modify your WordPress files, and create 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 editing your wp-config.php file.

Security Measure #9 – Remove Access To The WordPress Uploads Directory

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

By default, this folder is visible to all users online. All someone has to do to see all of the contents in your “uploads” directory is visit the directory using a web 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 hackers or malicious users, this can compromise 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, 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 ask help from someone who knows what they are doing if you are unsure about what to do.

Security Measure #10 – Use Security Plugins

There are a number of great WordPress security plugins available that specifically address most common security issues faced by WordPress site owners, such as preventing hackers from gaining access to vital information about your site, protecting your files from botnets, preventing injections of code into files, 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 issues that could lead to hackers accessing your site files and causing damage to your site is SecureScanPro.

SecureScanPro - total security software solution for WordPress

(SecureScanPro – complete security plugin for WordPress)

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

Another plugin you may want to consider using is BlogDefender.

Blog Defender Security Product Suite For WordPress Sites

Blog Defender

(Blog Defender)

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

BlogDefender shows you where potential security weaknesses in your WordPress installation are …

Blog Defender Security Suite For WordPress

And then shows you how to easily fix these …

Blog Defender Security Suite For WordPress

If 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 WordPress core files, plugins and themes updated to their latest versions, tightening file and data protection and taking other necessary precautions can have disastrous consequences.

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

As one last reminder of the importance of website security, below is the advice given by an expert on web security to all WordPress users after the large-scale brute-force attacks by botnets 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 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 seek help from a professional WordPress security specialist, or search for a professional WordPress technical provider on

Also, do yourself a favor and subscribe to to receive notifications whenever we publish new articles and tutorials on WordPress security and tutorials about new security plugins.


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

Disclaimer: WordPress and its related trademarks are registered trademarks of Automattic, Inc. This site is not affiliated with nor sponsored by Automattic, Inc. or the WordPress Open Source project. This site and the products and services offered on this site are not affiliated, associated, sponsored, or endorsed by WordPress, nor have they been tested, reviewed, or certified by WordPress. The owner, contributors and/or advertisers may derive financial benefit from sales of items advertised, linked to, or reviewed on this site.


Did you find this article useful? Feel free to use the links below to share this tutorial with others.

Author: Martin Aranovitch provides hundreds of FREE WordPress tutorials for beginners. Our detailed step-by-step tutorials will save you money and teach you how to start, manage, and grow a website or blog using WordPress that puts you in complete control and delivers results with no coding skills required!