WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Beginners Guide» 11 Top Reasons Why WordPress Sites Get Hacked (and How to Prevent it)

11 Top Reasons Why WordPress Sites Get Hacked (and How to Prevent it)

Last updated on September 9th, 2018 by Editorial Staff
230 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
11 Top Reasons Why WordPress Sites Get Hacked (and How to Prevent it)

Recently, one of our readers asked us why do WordPress sites get hacked? It is frustrating to find out that your WordPress site has been hacked. In this article, we will share the top reasons why WordPress site gets hacked, so you can avoid these mistakes and protect your site.

Why WordPress sites get hacked?

Why is WordPress Targeted by Hackers?

First, it is not just WordPress. All websites on the internet are vulnerable to hacking attempts.

The reason why WordPress sites are a common target is because WordPress is world’s most popular website builder. It powers over 31% of all websites meaning hundreds of millions of websites across the globe.

This immense popularity gives hackers an easy way to find websites that are less secure, so they can exploit it.

Hackers have different kind of motives to hack a website. Some are beginners who are just learning to exploit less secure sites.

Some hackers have malicious intents like distributing malware, using a site to attack other websites, or spamming the internet.

With that said, let’s take a look at some of the top causes of WordPress sites getting hacked, and how to prevent your website from getting hacked.

1. Insecure Web Hosting

Like all websites, WordPress sites are hosted on a web server. Some hosting companies do not properly secure their hosting platform. This makes all websites hosted on their servers vulnerable to hacking attempts.

This can be easily avoided by choosing the best WordPress hosting provider for your website. It ensures that your site is hosted on a safe platform. Properly secure servers can block many of the most common attacks on WordPress sites.

If you want to take extra pre-caution, then we recommend using a managed WordPress hosting provider.

2. Using Weak Passwords

Using weak passwords

Passwords are the keys to your WordPress site. You need to make sure that you’re using a strong unique password for each of the following accounts because they can all provide a hacker complete access to your website.

  • Your WordPress admin account
  • Web hosting control panel account
  • FTP accounts
  • MySQL database used for your WordPress site
  • Email accounts used for WordPress admin or hosting account

All these accounts are protected by passwords. Using weak passwords makes it easier for hackers to crack the passwords using some basic hacking tools.

You can easily avoid this by using unique and strong passwords for each account. See our guide on the best way to manage passwords for WordPress beginners to learn how to manage all those strong passwords.

3. Unprotected Access to WordPress Admin (wp-admin Directory)

The WordPress admin area gives a user access to perform different actions on your WordPress site. It is also the most commonly attacked area of a WordPress site.

Leaving it unprotected allows hackers to try different approaches to crack your website. You can make it difficult for them by adding layers of authentication to your WordPress admin directory.

First you should password protect your WordPress admin area. This adds an extra security layer, and anyone trying to access WordPress admin will have to provide an extra password.

If you run a multi-author or multi-user WordPress site, then you can enforce strong passwords for all users on your site. You can also add two factor authentication to make it even more difficult for hackers to enter your WordPress admin area.

4. Incorrect File Permissions

File permissions

File permissions are a set of rules used by your web server. These permissions help your web server control access to files on your site. Incorrect file permissions can give a hacker access to write and change these files.

All your WordPress files should have 644 value as file permission. All folders on your WordPress site should have 755 as their file permission.

See our guide on how to fix image upload issue in WordPress to learn how to apply these file permissions.

5. Not Updating WordPress

Some WordPress users are afraid of updating their WordPress sites. They fear that doing so would break their website.

Each new version of WordPress fixes bugs and security vulnerabilities. If you’re not updating WordPress, then you are intentionally leaving your site vulnerable.

If you are afraid that an update will break your website, then you can create a complete WordPress backup before running an update. This way, if something doesn’t work, then you can easily revert back to previous version.

6. Not Updating Plugins or Theme

Just like the core WordPress software, updating your theme and plugins is equally important. Using an outdated plugin or theme can make your site vulnerable.

Security flaws and bugs are often discovered in WordPress plugins and themes. Usually, theme and plugin authors are quick to fix them up. However, if a user does not update their theme or plugin, then there is nothing they can do about it.

Make sure you keep your WordPress theme and plugins up to date.

7. Using Plain FTP instead of SFTP/SSH

SFTP instead of FTP

FTP accounts are used to upload files to your web server using an FTP client. Most hosting providers support FTP connections using different protocols. You can connect using plain FTP, SFTP, or SSH.

When you connect to your site using plain FTP, your password is sent to the server unencrypted. It can be spied upon and easily stolen. Instead of using FTP, you should always use SFTP or SSH.

You wouldn’t need to change your FTP client. Most FTP clients can connect to your website on SFTP as well as SSH. You just need to change the protocol to ‘SFTP – SSH’ when connecting to your website.

8. Using Admin as WordPress Username

Using ‘admin’ as your WordPress username is not recommended. If your administrator username is admin, then you should immediately change that to a different username.

For detailed instructions check out our tutorial on how to change your WordPress username.

9. Nulled Themes and Plugins

Malware

There are many websites on the internet that distribute paid WordPress plugins and themes for free. Sometimes it’s easy to get tempted to use those nulled plugins and themes on your site.

Downloading WordPress themes and plugins from unreliable sources is very dangerous. Not only they can compromise the security of your website, but they can also be used to steal sensitive information.

You should always download WordPress plugins and themes from reliable sources such as the plugin/theme developers website or official WordPress repositories.

If you cannot afford or don’t want to buy a premium plugin or theme, then there are always free alternatives available for those products. These free plugins may not be as good as their paid counterparts, but they will get the job done and most importantly keep your website safe.

You can also find discounts for many of the popular WordPress products in the deals section on our website.

10. Not Securing WordPress Configuration wp-config.php File

WordPress configuration file wp-config.php contains your WordPress database login credentials. If it is compromised, then it will reveal information that could give a hacker complete access to your website.

You can add an extra layer of protection by denying access to wp-config file using .htaccess. Simply add this little code to your .htaccess file.

<files wp-config.php>
order allow,deny
deny from all
</files>

11. Not Changing WordPress Table Prefix

Many experts recommend that you should change the default WordPress table prefix. By default, WordPress uses wp_ as a prefix for the tables it creates in your database. You get an option to change it during the installation.

It is recommended that you use a prefix that is a little more complicated. This will make it harder for hackers to guess your database table names.

For detailed instructions, see our guide on how to change the WordPress database prefix to improve security.

Cleaning up a Hacked WordPress Site

Cleaning up a hacked WordPress site can be really painful. However, it can be done.

Here are some resources to get you started on cleaning up a hacked WordPress site:

  • Beginner’s guide to fixing your hacked WordPress site
  • How to scan your WordPress site for potentially malicious code
  • how to find a backdoor in a hacked WordPress site and fix it
  • What to do when you are locked out of WordPress admin (wp-admin)
  • Beginner’s guide: how to restore WordPress from backup

Bonus Tip

For rock solid security, we use Sucuri on all our WordPress sites. Sucuri provides malware detection and removal services as well as a website firewall that will protect your website against the most common threats.

See how how Sucuri helped us block 450,000 WordPress attacks in 3 months

We hope this article helped you learn the top reasons why WordPress site gets hacked. You may also want to see our ultimate WordPress security guide to protect your WordPress site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

230 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • How to Start Your Own Podcast (Step by Step)

    How to Start Your Own Podcast (Step by Step)

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

3 Comments

Leave a Reply
  1. SaifZiya says:
    Sep 12, 2018 at 5:44 am

    Thanks for these amazing tips. I going to add the code to .htaccess file now.

    Reply
  2. Amit Khandelwal says:
    Sep 11, 2018 at 6:41 am

    Hello, i have secure my wp-admin folder through folder privacy but how can i do the same for wp-login url?

    Reply
  3. Dragos says:
    Sep 10, 2018 at 9:40 am

    You can also not install in the default location your WordPress website so you can actually install the wp into a folder named “secure” and then with some tricks your visitors will enter to your website.com not website.com/secure in order to see your site.

    Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
WPForms Logo
WPForms
Drag & Drop WordPress Form Builder Plugin. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2021 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2021)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2021)
    • SiteGround Reviews from 4464 Users & Our Experts (2021)
    • Bluehost Review from Real Users + Performance Stats (2021)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2021 – Step by Step Guide
Deals & Coupons (view all)
Helpie WP
Helpie WP Coupon
Get 20% OFF on Helpie WP premium WordPress knowledgebase wiki plugin.
AliDropship Coupon Code
AliDropship Coupon
Get 15% off on AliDropship WordPress and WooCommerce dropshipping plugin.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
  • Growth Fund
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon
  • AIOSEO

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress Security by Sucuri.