WordPress Security Basics for Beginners: How to Protect Your Site from Hackers

A laptop protected by a shield and a padlock, showing a simple website page.

If you run a WordPress site, you do not need to become a security expert to protect it. Most hacked WordPress sites are not broken into through WordPress itself. Attackers get in through outdated plugins and themes, weak or stolen admin logins, and hosting accounts, and then use automated scripts to try the same tricks on thousands of sites at once. This guide from Padhaku gives you the ten steps that matter, in order of impact, using free tools wherever possible. The first eight steps need no code at all.

The numbers explain why updates come first. In 2025, researchers reported 11,334 new vulnerabilities in the WordPress ecosystem, up 42 percent on 2024, and 91 percent of those flaws were in plugins. Only six low-priority flaws were found in WordPress core itself in the same year. Heavily attacked flaws were exploited within about five hours of disclosure. That is why this guide treats updating as the main defence, not a monthly chore, and why a security plugin on its own is never enough.

How WordPress sites actually get hacked

Think of your site as a house with three doors. The first door is outdated software: a plugin or theme with a known flaw. The second is the login page: a weak password, a reused password, or a username like admin. The third is the hosting account: if someone gets into your hosting or domain account, they can reach every site on it. Bots scan the internet looking for all three, so your site does not have to be famous or big to be tried. A small blog with ten visitors a day is still scanned, because the attack is automated.

What attackers do after they get in is practical, not personal. They inject spam pages and links, redirect your visitors to scams or malware downloads, steal customer data from shops, or use your server to send spam and attack other sites, which can get your domain blocklisted. That is why the goal is not only to keep attackers out, but to have a backup ready so you can recover fast if they ever get in.

Three doors attackers use to enter a WordPress site: outdated plugins, weak logins and hosting accounts.
Most break-ins come through one of these three doors, not through WordPress itself.

The 10-point WordPress security checklist

Work through this list in order. The first four steps stop most real-world attacks. The rest make a break-in harder and a recovery faster.

StepWhat to doHow to check it worked
1. Update everythingInstall all waiting core, plugin and theme updates, then turn on auto-updatesDashboard, Updates shows nothing waiting
2. Delete what you do not useDelete unused plugins and themes, do not just deactivate themYour plugins list holds only what you actually use
3. Choose plugins carefullyInstall only from WordPress.org or a reputable vendor, and never install nulled pluginsEvery plugin was updated in the last year and has active support
4. Strong, unique admin loginUnique username, long password from a password manager, different passwords for hosting and emailYour username is not admin and your password is unique to this site
5. Two-factor authenticationTurn on 2FA for every administrator and editorLogin asks for a code from your phone app
6. HTTPS everywhereFree certificate installed, both addresses in Settings, General start with httpsEvery page shows https and a padlock in the address bar
7. One security pluginInstall one firewall plugin, run the first scan, turn on alertsFirewall and scan are on, and alerts reach your email
8. Tested backups off the serverAutomatic backups of files and database, stored outside your hosting accountA recent backup exists off the server, and you have tested a restore
9. Small hardening stepsStop file editing from the dashboard, check file permissionsTheme and plugin editors are off in the dashboard
10. Monitoring onLogin and file-change alerts, uptime monitoring, Search Console set upYou get an alert for new logins, file changes and downtime

1. Update WordPress, plugins and themes, and turn on automatic updates

This is the single most effective step. Every update closes flaws that are already public, and public flaws are the ones bots scan for first. Go to Dashboard, Updates and install everything waiting: WordPress core, then plugins, then themes. When this guide was checked in mid-November 2026, the latest release in the 7.1 series was 7.1.4, released 28 October 2026, and only the most recent release is maintained with security fixes. Check what version your site runs under Dashboard, Updates, and update if yours is older.

Then turn on automatic updates so you do not have to remember. On the Plugins screen and the Themes screen, click Enable auto-updates for each item. Automatic updates for plugins and themes have been built into WordPress since version 5.5, and minor core security releases install automatically by default. For most sites, automatic updates for plugins are the right choice: with heavily attacked flaws exploited within hours, waiting a week is riskier than the small chance an update breaks something. Keep backups on, so you can roll back if an update ever causes a problem, and take a manual backup before a major WordPress update.

One caution: do not update from a nulled or pirated copy of a plugin. Nulled plugins often contain backdoors, and they never receive updates, so the flaw stays open forever.

2. Delete the plugins and themes you do not use

Every plugin and theme on your server is code an attacker can try to exploit, even if it is switched off. Deactivating a plugin is not enough. Delete it. Go through Plugins, Installed Plugins and remove anything you do not use. Do the same under Appearance, Themes, keeping one default WordPress theme as a fallback in case your active theme ever fails.

Fewer components also means fewer updates to track and a faster site. Removing unused plugins is one of the simplest speed fixes too, which is why it appears in our guide to fixing a slow WordPress site. While you are there, check the update dates of the plugins you keep. A plugin that has not been updated in more than a year, or one that WordPress.org has closed, should be replaced with an actively maintained alternative.

3. Install plugins only from sources you can trust

Install plugins from the WordPress.org plugin directory or from a reputable vendor’s own site, and themes from WordPress.org or a known theme company. Before installing anything, check three things on its page: the last update date, the number of active installations, and whether support questions get answers. A plugin with recent updates and active support is a safer bet than one abandoned two years ago.

Never install nulled or pirated premium plugins and themes. They are one of the most common ways backdoors reach a site, and they never receive security updates. Our guide on nulled themes and plugins explains the full risk. Paid plugins are not automatically safer than free ones either: in 2025, researchers received 1,983 valid vulnerability reports about premium or freemium components, and 76 percent of those were exploitable in real attacks. The question is not free or paid, but maintained or abandoned.

Also remember the difference between the software and the service: WordPress.org is the free software you install on your own hosting, while WordPress.com is a hosted service. If you are unsure which one you use, this comparison of WordPress.org and WordPress.com explains the difference. The steps in this guide are for self-hosted WordPress.org sites.

4. Use a strong, unique admin login

Most WordPress break-ins that do not come through a plugin come through a password: reused from another site, guessed by a brute-force bot, or stolen in a data breach somewhere else. Fix the login itself before adding anything clever.

  • Do not use admin as the username. Pick something unique that is not your name or your site’s name.
  • Use a long, random password, at least 16 characters, and store it in a password manager. Never reuse it anywhere else.
  • Use a different password for your hosting account, your domain registrar and your database. If one leaks, the others still hold.
  • Protect the admin email account with two-factor login too. Whoever controls that mailbox can reset your WordPress password.
  • Under Users, remove old staff and freelancer accounts, and give every account the lowest role it needs. An editor account that gets stolen can do far less damage than an administrator account.

5. Turn on two-factor authentication

Two-factor authentication (2FA) asks for a second check after your password, usually a six-digit code from an app on your phone. It stops the stolen-password case almost completely: even if someone has your password, they still cannot log in without your phone. WordPress core does not include 2FA, so you add it with a plugin.

The simplest option is the free Two Factor plugin, developed by the WordPress community and listed on WordPress.org under the WordPress.org author name. Its page showed version 0.17.0 with more than 100,000 active installations in mid-November 2026, and it needs WordPress 7.0 or higher. It supports authenticator apps such as Google Authenticator, Authy or 1Password, which is the method it recommends, plus ten one-time backup codes for when you lose your phone, and email codes, which it rates as medium security because they depend on your mailbox staying safe. Set it up under Users, Profile for each account, and turn it on for every administrator and editor, not just the main admin.

Wordfence, covered in step 7, also includes 2FA in its free version. Either way, also limit login attempts: WordPress allows unlimited login attempts by default, so a bot can guess passwords all day. Use a plugin such as Limit Login Attempts Reloaded, or your security plugin’s brute-force protection, to block an address after three to five failed attempts.

6. Switch on HTTPS and check it properly

HTTPS encrypts the connection between your visitors and your site, so passwords and form entries cannot be read on the way. Most hosts offer a free certificate from Let’s Encrypt, so this step usually costs nothing. Ask your host to install one if it is not already on, then check Settings, General: both the WordPress Address and the Site Address should start with https://. Finally, make sure all http traffic redirects to https, so nobody lands on the unencrypted version by mistake.

If you are still choosing a host, or wondering what a hosting plan should include, our guide to buying domain and hosting on a student budget explains what to check, including free SSL. And if your host offers managed WordPress hosting, ask what security it includes: many managed hosts patch PHP, scan for malware, isolate sites and keep backups for you, but the exact cover varies, so check rather than assume.

7. Install one security plugin, and only one firewall

A security plugin adds a firewall, a malware scanner and login protection in one place. It does not replace updates, few plugins, 2FA and backups. Those matter more than which plugin you choose. Pick one firewall, not several: two firewalls can conflict and slow your site down.

PluginWhat it doesFree tier, as shown on WordPress.org in mid-November 2026
Wordfence SecurityPlugin firewall, malware scan, login security with 2FAFree version 9.1.1, 5,000,000+ active installs. New firewall rules reach the free tier later than the paid tier.
Sucuri SecurityAuditing, malware scan, hardeningFree version 2.8.1, 600,000+ active installs. Its firewall is a separate paid cloud service.
Two FactorTwo-factor login onlyFree version 0.17.0, 100,000+ active installs. No firewall or scanner, so pair it with the steps above.
UpdraftPlusBackups and migrationFree version 1.26.14, 4,000,000+ active installs. A backup tool, not a security scanner.

After installing, run the first full scan. Wordfence, for example, checks your files against official WordPress.org checksums and flags unexpected changes. Turn on email alerts for logins and file changes, so you hear about trouble instead of discovering it weeks later. A firewall can also run at the network edge, for example Cloudflare’s free tier, which blocks bad requests before they reach WordPress at all. In one set of tests cited by Patchstack, ordinary hosting defences blocked only 12 percent of WordPress-specific attacks, which is why a WordPress-aware layer helps.

8. Back up your site regularly, and keep the copies somewhere else

Backups are not prevention. They are your recovery plan for the day something goes wrong, and something eventually goes wrong on well-managed sites too: a bad update, a plugin conflict, or a compromise. A backup has two parts that belong together: the database (posts, comments and settings) and the files (core, plugins, themes and uploads). A database-only copy does not restore the site.

  • Back up daily for active sites and shops, and before every update.
  • Store the copies off the server: Google Drive, Dropbox, Amazon S3, or your host’s separate backup system. A backup stored only on your server is lost if the server is compromised or the hosting account is closed.
  • Keep several days of copies, so you can go back to a point before an infection started.
  • Test a restore at least once. Restore one backup to a test site or a staging copy and check that it works. A backup you have never tested is not a backup you can rely on.

UpdraftPlus, in the table above, handles both database and file backups on a schedule in its free version: daily database backups and weekly file backups suit most small sites. Whatever tool you use, check once a month that the backups are actually running. A backup job that failed silently for three months is the same as no backup.

9. Three small hardening steps for when the basics are done

These steps help, but they matter far less than the first eight. Do them only after the basics are in place, and back up first, because editing the wrong file can break your site. If any of this sounds risky, skip it. The first eight steps are the protection; these are extras.

Stop file editing from the dashboard

Add define( 'DISALLOW_FILE_EDIT', true ); to your wp-config.php file. After that, even a stolen admin login cannot edit plugin or theme code from the dashboard. Edit wp-config.php carefully, through your host’s file manager or SFTP, and keep a copy of the original file before you change it.

Check file permissions

The WordPress handbook recommends directories at 755 and files at 644, with wp-config.php at 400 or 440 so only you and the web server can read it. Most good hosts set this correctly already. Ask your host to check if you are unsure, rather than changing permissions by trial and error.

Changing the login URL is not real protection

Moving the login page or changing the database table prefix cuts down bot noise, but the WordPress handbook calls these security through obscurity: they do not stop a determined attacker. Treat them as extras, not as protection, and never as a replacement for 2FA and strong passwords.

10. Watch for trouble: monitoring and warning signs

Security is not a one-time job. Set up three kinds of watching, then check them on a schedule.

  • Login and file-change alerts from your security plugin, sent to an email you actually read.
  • Uptime monitoring, so you know quickly if the site goes down or starts redirecting visitors.
  • Google Search Console, which warns you when Google detects hacked content or malware on your site. Set it up before you need it.

Run a short security audit every three months: review the plugin list for anything unused or outdated, check that backups are running, confirm file permissions, and review the user list for accounts you do not recognise. Warning signs that need immediate attention: new admin users you did not create, files you do not recognise, sudden redirects, or search results showing spam pages for your site. If you see any of these, jump to the recovery steps below.

If your site is already hacked, do this first

Act calmly and in this order. Cleaning files while the attacker still has a login only buys a few hours, because they will simply come back in.

  1. Take a copy first. Download the files and database as they are now. You may need them to find out how the attacker got in.
  2. Change every password. Hosting, SFTP, database, every WordPress administrator, and the admin email account. Then replace the security keys in wp-config.php to end all sessions.
  3. Restore or clean. Restore the last clean backup if you have one. Otherwise reinstall WordPress core and every plugin and theme from fresh copies, and remove unknown files and admin users.
  4. Fix the hole. Update or remove the vulnerable plugin. A cleaned site with the same outdated plugin is reinfected within days.
  5. Ask Google to review. If Search Console reported hacked content or malware, request a review there once the site is clean.

A worked example: securing a small business site in one evening

The example below is hypothetical, given only to explain the steps. Actual results may differ.

Meera runs a small bakery website in Jaipur on WordPress. She built it herself, has 12 plugins installed, and has never thought about security. One Saturday evening she works through this guide. First she opens Dashboard, Updates and installs 9 waiting updates, then turns on auto-updates for every plugin. She deletes 4 plugins she no longer uses and one old theme, keeping the default theme as a fallback. She changes her admin username from admin to something unique, sets a new 16-character password from her password manager, and turns on 2FA with the free Two Factor plugin. She checks that her site already loads over https, installs Wordfence free, runs the first scan and turns on email alerts. Finally she installs UpdraftPlus, sets daily database backups and weekly file backups to her Google Drive, and restores the backup once on a test copy to check it works. The whole job takes her about two hours, and from then on the routine is a five-minute check each week: updates done, backup ran, no strange alerts.

If you build sites for clients as a freelancer, the same evening applies to every client site, and it is worth doing before you hand a site over. Our 7-day plan for building a freelancer portfolio website with WordPress covers the build; this guide covers keeping those sites safe after launch.

Five mistakes beginners make

  1. Installing a security plugin and doing nothing else. A plugin cannot fix outdated software or a weak password. Updates, few plugins, 2FA and backups matter more.
  2. Using the same password for WordPress, hosting and email. One leak hands over everything. Use a password manager and a unique password for each account.
  3. Backing up only to the same server. If the server is compromised, the backup goes with it. Store copies off the server.
  4. Installing nulled themes and plugins to save money. They often hide backdoors and never receive updates. The saving is not worth the risk.
  5. Thinking my site is too small to be hacked. Bots scan every address they can find. Size does not protect you; updates and 2FA do.

Frequently asked questions

Is WordPress itself secure?

WordPress core has a dedicated security team and few serious flaws: only six low-priority core vulnerabilities were recorded in 2025. The risk comes from the plugins, themes, weak logins and old servers around it.

Do I need a security plugin?

Not strictly, but most site owners benefit from one that adds a firewall, login protection and alerts. Updates, few plugins, 2FA and backups matter more than which security plugin you choose.

Should I turn on automatic plugin updates?

For most sites, yes. With heavily attacked flaws exploited within hours, waiting a week is riskier than the small chance an update breaks something. Keep backups so you can roll back.

Does changing the login URL help?

Only a little. It cuts down bot noise but does not stop a determined attacker. Treat it as an extra, never as a replacement for a strong password and 2FA.

How often should I back up?

Daily for active sites and shops, and before every update. Keep several days of copies so you can go back to a point before an infection started.

What to do next

Do step 1 today, even if you do nothing else: open Dashboard, Updates and install everything waiting, then turn on auto-updates. Add 2FA this week. Set up off-server backups before your next post, not after. Then put a five-minute weekly check in your calendar: updates installed, backup ran, no alerts you do not recognise. That small routine is most of WordPress security.

If you are still learning WordPress itself, start with the difference between WordPress.org and WordPress.com, then work through the steps here. And if you want a structured path into digital skills, explore the Skill Seeker program on Padhaku. It is the structured starting point we suggest for beginners building real skills.

Sources and further reading

  • How to Secure a WordPress Website: 2026 Security Checklist, Reviewed by Pro (rewritten 13 November 2026; vulnerability figures from Patchstack’s State of WordPress Security in 2026): reviewedbypro.com
  • Hardening WordPress, WordPress Advanced Administration Handbook: developer.wordpress.org

About Padhaku

Padhaku is an India-focused digital skills learning platform founded by Anubhav Shukla. It focuses on making practical digital education more accessible to learners.

1 Comment.

Leave a Reply

Your email address will not be published. Required fields are marked *