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 leading content management system in the world and the online publishing platform of choice 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.

In early 2013, WordPress installations around the world were subjected to large-scale brute force attacks.

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

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

What Are 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)

There are many ways hackers try to break into a WordPress site. One of these is by trying to guess the site admin’s login username and password. This can be done with scripts and software tools that automatically tries to guess hundreds of possible login combinations in minutes.

If you’re using obvious login details, your site can be easily hacked by a malicious software’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/botnet)

A “Botnet” is a network of private computers that have been compromised and infected with malicious software, which are then controlled remotely as a group, often without the computer owners even being aware of this.

Botnets are often used to blast mass spam emails.

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 infecting computer networks all around the globe since 2009 …

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 globe since 2009. Image:

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

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

WordPress is the world's most popular CMS which makes it a target for hacking attacks

(WordPress often is targeted by hackers, due to its popularity)

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

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 business.

To learn what makes WordPress a very secure web platform, read this article: WordPress Security What Every Website Owner Needs To Know About WordPress

Important Info

It’s important to understand that, in the case of the brute force botnet attack described above, there was no WordPress vulnerability being exploited (the same script was also targeting sites built using platforms 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.


How To Prevent Your WordPress Blog From Brute-Force Attacks – Ten Security Points

Every blog with a vulnerability offers some value to hackers. A compromised blog not only offers newbie hackers opportunities to improve their hacking skills and win “respect” amongst their peers, but it can also acts as a resource for distributed attacks, spreading malware and participating in information theft.

If a hacker can exploit a vulnerability that allows them to take over your website, the website can then be used as part of a larger network of “bots” to target larger and more highly-valued sites.

Additional undesirable effects of being hacked include getting blacklisted by search engines, having spammy links promoting things like casinos, discounted fashion, etc. in your content and meta data, redirecting visitors to phishing sites, data exfiltration (stealing information or Personal Identifiable Information from your web applications), and lots of other nasty things.

The truth is that software-driven bots are probably looking for vulnerabilities and trying to hack into your website or blog right now. Whether they can break in depends on how hard or easy you can make it for them to continue trying until they can either find how to break in, or decide to look for a less secure target.

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

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

Hackertarget - WP Security Scan(Hackertarget – WP Security Scan Screenshot source:

You will see that the check returns various results and details about your website …

Website Security Scan

(Hackertarget – WordPress security check results. Source:

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

WordPress Security Check(Product image: Blog Defender)

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

If your website is driven by WordPress and you’re not preventive 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 hitting WordPress sites around the world!

Typically, when a website or blog gets broken into, webmasters can find themselves completely “locked out” of their own site, or notice that their content has been altered or that everything has been entirely wiped out. Typically, compromised sites will become infected with malicious scripts without the owner’s knowledge or awareness.

To avoid the heartache and aggravation (and potential loss of valuable business data) of discovering that your site has been hacked into, below are ten essential and effective security measures that will help to prevent your WordPress site from brute force attacks.


Note: A few of the measures listed below require some technical understanding of how to modify core WordPress and/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 professional WordPress service provider in our WordPress Services Directory.


Security Measure #1 – Contact Your Hosting Service Provider

Contact your webhosting company and ask them what security precautions have been put into place to protect your site from botnet attacks, and what they do to ensure that your files and data get backed up.

It’s important to make sure that your web host is backing up your sites and that, if anything happens, you can quickly and easily get your site back.

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

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

A complete WordPress maintenance routine ensures that:

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

A full WP site maintenance routine looks like this …

Maintaining your WP web site regularly 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. Screenshot image:

Again, we cannot stress enough how important maintaining your WordPress web site backed up and up-to-date is. WP maintenance is not hard or time-consuming, but it must be done to ensure the security of your website. If you don’t want to learn how to do WP maintenance yourself, pay someone to do it but make sure it gets done. Backing up your site is the next most important thing you should do after making sure that you are still breathing!

If you don’t want to back up your site manually, there are a number of plugins you can use. Learn about a WordPress backup plugin that can fully automate your site backups here: Back Up, Duplicate And Keep Your WP Site Protected With Backup Creator Plugin For WP

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

The mass brute force attack on WordPress is mostly attempting to compromise site admin panels by exploiting installations using “admin” as their account name.

For reasons of website security, don’t install sites with the username admin. This is the first area of potential vulnerability hackers will test. If your blog’s user name is admin, then make sure you change it immediately.

We have created a step-by-step tutorial created especially for non-technical WordPress admin users that shows you how to change your admin username here: How To Change Your WordPress User Name From Admin To A More Secure User Name

Security Measure #4 – Choose A Strong Password

A “brute force” attack occurs when a malicious script persistently hits a login or password field with different character strings in an attempt to guess the right login combination that will give the hacker entry to your website.

Unless you put some measure in place to prevent the brute force attack from happening (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 botnets. Make sure that you change your password to a string that is at least eight characters long, with both upper and lowercase letters, combined with “special” characters (^%$#&@*).


You can use a password tool like Roboform to generate strong passwords …

Roboform is a password management tool that lets you easily generate different  passwords(Roboform is a password program that lets you easily create different strong passwords)

We have created a simple step-by-step tutorial on how to change your WordPress password here: Changing WordPress Passwords

Security Measure #5 – Prevent Your wp-config.php File From Being Visible

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 file)

If hackers break into your site, they will search for your wp-config.php file, because this is the file that contains your database details, security keys, etc. Getting access to this information would allow them 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, 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 – Rename Or Delete Unnecessary Website 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 remove these files, then just rename them.

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

Hackers search for vulnerabilities they can exploit in older versions of WordPress, including out-of-date versions of WordPress plugins and themes.

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

Security Measure #8 – Disable The Theme Editor

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

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

WP Theme Editor Menu

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

This means that anyone logging into your blog’s admin can view and make changes to your WordPress theme files, or 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 – Remove Access To Your WordPress Uploads Folder

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

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

(WordPress uploads folder)

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

If any files stored in his folder have weaknesses or vulnerabilities that can be exploited by malicious users, anyone could upload unauthorized file types or compromise the security of 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, uploading 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 consult a professional if you are not sure about what to do.

Security Measure #10 – Install WordPress Security Plugins

There are a number of security plugins for WordPress available that specifically address many common security issues faced by WordPress site owners, such as preventing hackers from accessing your site, protecting your site from botnets, preventing unauthorized file uploads, etc.

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

SecureScanPro - WP security software

(SecureScanPro – total security software for WordPress)

SecureScanPro is easy to install and easy to use, and takes care of most of the security issues that WordPress users need to address.

Another security plugin you may want to consider using is BlogDefender.

Blog Defender Security Product Suite

Blog Defender Security Suite For WordPress Websites(Blog Defender WordPress Security Suite)

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

BlogDefender scans you website for security holes …

Blog Defender Security Suite For WordPress Web SitesAnd lets you easily fix these …

Blog Defender Security Product Suite For WordPressIf you don’t want to invest in 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 secure web platform, but neglecting essential maintenance tasks like making sure that your WordPress software, WordPress plugins and themes are kept 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, securing your site is something you 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 worldwide brute force attacks by botnets 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, website 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 seek help from a professional WordPress security specialist, or search for a professional WordPress service provider in our WordPress Services Directory.

Also, please subscribe to to receive notifications via email when we publish new tutorials on WordPress security and tutorials about new WordPress security plugins and solutions.

Get Thrive Leads for WordPress


"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,