9 December 2024

How to Secure a WordPress Website: A Practical UK Guide

Blue-lit server cabinets used for website hosting

Updated 1 December 2026 · A practical guide for self-hosted WordPress websites

To secure a WordPress website, start with updates, protected accounts and backups you can actually restore. Then add sensible traffic protection, monitoring and a clear plan for dealing with problems.

You cannot permanently future-proof WordPress against every cyber attack. Plugins change, new weaknesses are discovered and people leave businesses. What you can build is a website that is easier to maintain, harder to misuse and quicker to recover.

This guide is for owners of self-hosted WordPress websites, including small business sites, blogs and WooCommerce shops. You do not need to understand server commands to work through the priorities.

1. Choose hosting someone is responsible for maintaining

Ask your hosting provider what they maintain and what remains your responsibility. A hosting account, a WordPress maintenance service and malware clean-up are different things. The word “managed” needs a clear description of the work included.

A small website does not automatically need a VPS. Well-run shared or managed WordPress hosting can be appropriate. An unmanaged VPS gives you more responsibility: someone must maintain the operating system, services and security configuration.

Before ordering, ask who handles server patches, WordPress updates, backups, security alerts and restores. Check whether clean-up after an incident is included or quoted separately. Our cheap VPS hosting guide explains the difference between managed and unmanaged services.

Check PHP support and compatibility

PHP is the software WordPress runs on. Use a supported release that is compatible with your website, and keep its patch updates current. Check the official PHP support schedule; support dates change as releases age.

Ask your host to test a PHP change on a private staging copy first, particularly for a shop or a site with custom plugins. A newer release is only useful when the website still works correctly.

Hosting security is a shared job: write down who looks after the server, the WordPress installation and recovery. A control panel makes administration easier, but it does not replace that agreement.

2. Keep WordPress, plugins and themes updated

Open Dashboard → Updates to review pending WordPress, plugin and theme updates. Check paid products too: an expired licence or a disconnected update service may prevent an update appearing or being installed.

WordPress supports automatic updates, including individual plugin and theme settings. On Plugins → Installed Plugins, look for the automatic updates column. The official auto-update guide explains the controls and troubleshooting.

Choose an update process that someone actually follows. For a simple site, automatic updates with backups and alerts may suit you. For a busy shop, test significant changes and check checkout afterwards. Do not let testing become an excuse to leave a known security fix waiting indefinitely.

After updating, check the homepage, a service or product page, a form and any payment or booking journey. Receiving an “update completed” message does not tell you whether an enquiry still arrives.

TakeawayA reliable update routine needs three parts: a recovery option, the update itself and a check of the functions your business depends on.

Remove what you no longer use

Review unnecessary plugins and themes. Before deleting anything, confirm it is not a parent theme, a dependency or something needed for a planned restore. Download plugins from WordPress.org or the developer’s genuine website. Avoid pirated “nulled” copies of paid products.

The WordPress hardening guide is a useful reference for reducing unnecessary exposure and choosing trusted software sources.

3. Protect accounts beyond the WordPress login

Your email, domain registrar, hosting panel and backup storage also matter. An attacker who controls a recovery email or hosting account may not need your WordPress password. Use a password manager to create unique passwords for these accounts.

Enable two-factor authentication (2FA), also called two-step verification, wherever available. Prefer phishing-resistant passkeys where supported. Store recovery codes safely and confirm how you would regain access if your phone were lost. The NCSC’s account security guide covers these priorities.

For WordPress, use a maintained authentication plugin or a supported identity service to add 2FA or passkeys. Check your actual setup rather than assuming ordinary WordPress password login already includes them.

Give each person the access they need

Use named accounts so changes can be traced. A person writing articles does not usually need permission to install plugins. Review the WordPress roles and capabilities before choosing a role; plugins may add or change permissions.

When a colleague or freelancer leaves, review their access across WordPress, hosting and connected services. Transfer content ownership carefully when removing users. Keep a controlled recovery route for the owner.

Slow repeated login attempts

Rate limiting reduces repeated guesses. Your host, a firewall service or a security plugin may provide it. A CAPTCHA can reduce automated activity, but it does not fix vulnerable software. Test the login and password reset journey after changing protection. See WordPress guidance on brute-force protection.

4. Understand what a firewall and scanner can do

A web application firewall (WAF) filters requests using security rules. A malware scanner looks for suspicious files or behaviour. They have different jobs, and neither replaces patching or backups.

PREVENT

Reduce entry points

Updates, restricted access and suitable traffic rules reduce opportunities for misuse.

DETECT

Notice a change

Alerts and activity records help someone spot a problem and investigate it.

RECOVER

Restore safely

Separate backups and a rehearsed recovery process help the business get moving again.

WordPress security tools: useful differences
ToolWhere it helpsWhat to check
Wordfence SecurityA WordPress endpoint firewall, malware scanning and login protection.Free and paid editions differ. Its listing says new firewall rules and malware signatures reach the free edition after a 30-day delay. Review the current plan and resource requirements.
Cloudflare WAFFilters traffic passing through Cloudflare before it reaches your hosting server.The free managed ruleset has narrower coverage than paid managed rules. Confirm traffic is actually proxied and the features you need are included.

These are feature examples based on the developers’ documentation, not results from a comparative test. Avoid installing several overlapping security suites without a reason.

Firewall rules can also block legitimate activity. Test admin access, uploads, forms, checkout and integrations, and use event records to investigate problems. Cloudflare’s WordPress security guidance explains why carefully scoped adjustments matter.

5. Back up the files and database, then test a restore

A complete WordPress recovery normally needs both the database and files. The database holds content and settings; files include uploads, themes, plugins and configuration. Downloading the WordPress folder alone is not normally a database backup. See the official WordPress backup guide.

Keep multiple recovery points and a copy outside the live hosting account. Protect backup access separately. A copy that an attacker can delete through the same compromised account is a weak fallback.

Pick a schedule around the information you could afford to lose. As an illustrative example, restoring yesterday’s brochure site may lose a few edits; restoring yesterday’s shop could lose new orders. A busy shop may need much more frequent database protection. Agree this with whoever manages it.

Test a restore into an isolated, private environment. Check pages, images and access. Keep outgoing email and live payment actions disabled during the test so it cannot contact customers or process transactions accidentally. Record how long recovery took and what was missing.

Takeaway“Backups enabled” is a setting. Knowing where the backup is, who can access it and whether it restores is a recovery plan.

The NCSC’s backup guidance also explains keeping copies safe. For server backups, ask whether your provider offers retention or protections against deletion and how you would request a restore if you could not log in.

6. Harden sensitive areas without breaking useful features

HTTPS, configuration and public files

Use HTTPS across the site, including login and administration. It encrypts the connection; it does not prove that the site is free of malware.

Ask your host to protect configuration files, logs and backup archives from public download, and use appropriate file ownership and permissions. Do not copy universal permission settings or move wp-config.php without checking the server setup. Avoid leaving database exports or ZIP backups in a public web folder.

Should you disable XML-RPC?

If no service uses XML-RPC, consider disabling it with help from your host or a maintained tool. Some integrations depend on it, so check first. If it is needed, use appropriate restrictions and rate limits. Blocking the REST API indiscriminately can also break editing and integrations.

What about readme files and hiding the login page?

Removing an unnecessary public readme or changing a login address may reduce information exposure or automated noise. Neither repairs a vulnerable plugin or protects a stolen administrator account. Treat these as secondary adjustments, after updates, authentication and recovery.

A close-up illustration of PHP code
Review code before it reaches the live siteA short snippet can change permissions, expose information or break a feature. Test custom work and keep a clear way to reverse it.

Be careful with AI-generated code and connected tools

Use AI to help explain a change or draft code, then have someone competent review it. A snippet that appears to work may still handle permissions, file uploads or customer information incorrectly.

For a connected tool, ask what it can read, change and publish. Use a dedicated account with only the necessary permissions, approve changes on a practice site first and remove access when finished. Do not paste passwords, customer records or private backup contents into a chat.

WordPress application passwords can be revoked separately from the main login password. They generally act with the associated user’s permissions; do not assume each password has its own fine-grained restrictions. Review the user role and the integration itself. Our ChatGPT and WordPress guide explains the practice-site approach.

7. Monitor the website and keep a simple routine

Start with Tools → Site Health. The Status tab highlights configuration issues; Info shows technical details such as plugins and server information. A good result is useful, but it is not a complete security audit or a guarantee that the site is clean.

WordPress Site Health Info tab showing sections for WordPress, plugins, server and filesystem permissions
Example of the Info tab from WordPress.org’s official Site Health documentation. Appearance varies by version. Expand Server to review hosting information; use Status to investigate reported issues. Select the image to view it at full size.

Have useful alerts sent to an address someone reads. Unexpected administrator accounts, unexplained content changes, malicious redirects or warnings deserve investigation. A traffic spike alone is not proof of a hack.

A suggested routine to adapt to your website
WhenWhat to doKeep a record of
When an alert arrivesInvestigate credible security and backup failures; prioritise urgent patches.The issue, action taken and person responsible.
Weekly reviewReview updates, backup results and key enquiry or checkout journeys.Outstanding work and the latest successful backup.
Monthly reviewReview users, unused software and relevant security events.Access changes and the next maintenance tasks.
After major changes and periodicallyTest recovery and review the support agreement.Restore results, recovery contacts and any gaps.

This is NetHome’s suggested planning schedule, not a formal security standard. Higher-risk or frequently changing sites need closer attention.

Can you secure WordPress for free?

You can do a lot without buying a premium security suite. The main question is whether you have the time and knowledge to configure it, notice failures and respond. Paying for a tool does not automatically pay for someone to manage it.

Where a free approach may work, and where paying can help
NeedA free or included approachReasons to consider a paid service
Updates and account reviewsUse WordPress controls and maintain the site yourself.You need someone to test changes, track failures and take responsibility.
Login protectionA suitable maintained 2FA tool and strong account practices.You need central policies, support or more complex access management.
Firewall and scanningSuitable free or host-provided features, with their limitations understood.You need wider rule coverage, quicker threat updates or a supported response.
Backup and restoreExisting backup tools and storage, checked and tested by you.You need more frequent recovery points, protected retention or hands-on restores.
Incident responseFollow official guidance and work with your hosting provider.The incident exceeds your skills or you need specialist investigation and clean-up.

Before buying, compare renewal costs, storage, supported websites, response hours and exclusions. This guide does not quote fixed product prices because plans change. The tool links are ordinary reference links, not affiliate links.

What to do if you think your WordPress site has been hacked

Record what you saw and when. Contact your host or security specialist, preserve logs and take a protected copy for investigation. If visitors are at risk, arrange containment or an appropriate temporary page. Do not repeatedly overwrite the site before evidence is preserved.

From a trusted device, secure affected accounts, review users and revoke suspicious access. Clean up or restore from a verified clean point, fix the entry route and test before returning to normal. A restore alone may bring the same vulnerable software back. Follow the official WordPress hacked-site guidance and get qualified help where needed.

If personal information may have been affected, include that in the incident assessment and seek appropriate advice about reporting obligations.

Your WordPress security checklist

  • A named person owns maintenance and alerts.
  • WordPress, plugins and themes are maintained.
  • Hosting uses supported, patched software.
  • Important accounts have strong authentication.
  • User and integration access is reviewed.
  • Backups include files and the database.
  • A separate recovery copy is protected.
  • A restore has been tested privately.
  • Security changes are checked against real site journeys.
  • Recovery contacts and next steps are written down.

What future-proofing really meansChoose software you can maintain, access you can control and a recovery process you can carry out. Revisit all three as your website grows.

WordPress security FAQs

Can WordPress be completely protected from hackers?

No system can promise that. The aim is to reduce avoidable risks, detect problems and recover safely. Security needs to continue after the initial setup.

Do I need a WordPress security plugin?

Check what your host already provides. A plugin can add useful login protection, scanning or firewall features, but it should fill a clear gap. It does not replace updates and recovery planning.

Is a VPS more secure than shared hosting?

It depends on how it is configured and maintained. An unmanaged VPS is not automatically safer than a well-maintained hosting service. Compare responsibilities and protection, as well as resources.

Will HTTPS stop my WordPress site being hacked?

HTTPS protects data in transit. It does not fix vulnerable code, stop all malicious requests or remove malware from the website.

How often should I back up a WooCommerce shop?

Base the frequency on how many orders or changes you could afford to lose. Discuss database backup frequency and recovery with your provider. A daily backup may be insufficient for an active shop.

Is changing the WordPress login URL enough?

No. It may reduce automated noise, but strong authentication, timely updates and monitored protection remain necessary.

About this guide: Updated on 1 December 2026 with AI assistance and checked against the official guidance linked throughout. The Site Health screenshot is from WordPress.org documentation; other photographs are illustrative. This is general guidance, not an audit of your website.