See your new website free in about a minute Free .co.in or .com domain for the first year on yearly Starter and up 30-day money-back guarantee Free website migration Live chat with real people, 7 days a week

Home Guides How to Secure a WordPress Site

How to secure a WordPress site

The hardening that prevents a hack, rather than the cleanup that follows one.

How WordPress sites actually get hacked

Almost never by someone targeting your business. WordPress powers a huge share of the web, so automated bots scan continuously for known vulnerabilities and weak logins. You are not being singled out — you are being scanned, along with everyone else.

  • Outdated plugins and themes — by far the most common route
  • Weak or reused admin passwords — brute-forced in bulk
  • Nulled premium plugins — malware ships inside them deliberately
  • Abandoned installs — the test site nobody updates for two years

Lock down the login

The wp-login page is the single most attacked URL on any WordPress site. These steps remove most of that risk in under half an hour.

  • Never use “admin” as a username — it halves the work for an attacker
  • Use a generated password, unique to this site
  • Enable two-factor authentication on every administrator account
  • Limit login attempts so brute-force runs get blocked
  • Consider changing the login URL — obscurity is not security, but it does cut bot noise

Users and permissions

Every administrator account is a full set of keys. Most sites have more of them than they need, often belonging to people who left years ago.

  • Give each person the lowest role that lets them work — Editor, Author, Contributor
  • One administrator is usually enough; two is plenty
  • Remove accounts when someone stops working on the site
  • Check the user list periodically for accounts you do not recognise
  • An unexpected admin account is a strong sign of compromise

File and configuration hardening

A few server-side settings close off the routes that automated attacks rely on. If any of this is unfamiliar, ask us rather than guessing.

  • Set file permissions to 644 and directories to 755
  • Set wp-config.php to 640 — it holds your database credentials
  • Disable file editing in the dashboard by adding define('DISALLOW_FILE_EDIT', true); to wp-config.php
  • Disable PHP execution in the uploads folder
  • Keep no backup .zip or .sql files in a web-accessible directory

What your hosting should be doing

Some protection belongs at server level, where it works regardless of what happens inside WordPress. This is included on every Hostking plan rather than sold as an add-on.

  • Imunify360 — scans for malware and blocks known attack patterns before they reach your site
  • Server firewall — filters malicious traffic at the network edge
  • JetBackup — daily backups so a bad day is recoverable
  • Free SSL — encrypts traffic, and browsers now expect it
  • Server-level protection keeps working even if a plugin fails or you forget an update

Get online with Hostking

Hosting from ₹230.50/month billed annually, with free SSL, business email and daily backups included, plus a free .com domain from Starter up. Our AI builder makes your website free in about a minute, and on Website Care a designer perfects it — no agency fee, no contract.

Common questions

If yours is not here, ask us on live chat.

Chat with us
Does Hostking include WordPress security?

Yes. Every plan includes Imunify360 malware scanning, a server firewall, free SSL and daily JetBackup backups, at no extra cost.

How do you protect my website?

Every server runs Imunify360. Its firewall blocks known attack patterns, bad bots and repeated login attempts before they reach your site, and it scans for malware and cleans it up automatically. It runs on all our plans automatically.

Do I still need a security plugin?

A reputable one adds useful WordPress-level hardening such as login limiting and two-factor authentication. It complements server-level protection rather than replacing it.

Should I change my wp-login URL?

It reduces automated bot traffic, which is worth having. It is not security on its own — strong passwords, updates and two-factor matter far more.

How often should I update WordPress?

Security releases as soon as they appear. Major versions can wait a week or two, but not months. Enable automatic updates for security patches at minimum.

What if my site is already hacked?

Work through our WordPress malware cleanup guide, or get in touch and we will help. Change every password first, then restore from a clean backup.

Ready to get your website online?

Hosting from ₹230.50/mo, with free website migration and a 30-day money-back guarantee.