Privacy

How to Secure a WordPress Website: 14 Practical Tips for Beginners

26 Nov 2026 · 6 min read

WordPress powers a huge share of the websites on the internet, and that popularity makes it a favourite target for attackers. A hacked site can mean lost content, damaged search rankings, angry visitors and hours of stressful cleanup. This guide shows how to secure a WordPress website, step by step. The good news is that most attacks succeed through simple, preventable weaknesses — an old plugin, a weak password, or no backup at all.

Learning how to secure a WordPress website is not as technical as it sounds. WordPress itself is built with security in mind; most problems come from the extras we add around it — themes, plugins and hosting choices — and from habits we never get around to fixing. Work through the fourteen tips below and your site will be far harder to break into than the average blog.

1. Set Up Automatic Backups First

Before anything else, make sure you can recover. A backup is a complete copy of your site — its files and its database — stored somewhere safe. If anything goes wrong, a recent backup lets you restore your site instead of rebuilding it from scratch. Take backups regularly, and keep them on a different server from your website, so a problem with your hosting does not destroy the backup too. Many hosts offer backups, and there are also dedicated backup plugins that can run on a schedule automatically.

How to Secure a WordPress Website: 14 Practical Tips for Beginners

2. Choose a Reliable, Security-Minded Host

Your hosting company is the foundation of your site's security. A good host keeps its servers patched, runs a server-level firewall, watches for intrusions and stores backups away from your live site. Cheaper hosting that skips these basics leaves your site exposed no matter what you do inside WordPress. When comparing hosts, ask about their firewall, malware scanning, backup storage and how quickly they apply security patches.

3. Keep WordPress Itself Up to Date

Every WordPress release fixes bugs and closes security holes found in earlier versions. Running an old version is one of the easiest ways to get hacked, because attackers know exactly which weaknesses exist in each release. Turn on automatic updates for minor releases, and apply major updates promptly after checking that your theme and plugins still work with them.

4. Update Themes and Plugins Too

Plugins and themes are the most common way attackers get in, because they are written by many different developers and some contain flaws. When a developer releases an update, it often patches a vulnerability — so install updates as soon as they appear. If a plugin has not been updated for a long time, consider replacing it with a maintained alternative. Fewer, well-kept plugins are safer than a large collection of forgotten ones.

5. Use the Latest Version of PHP

WordPress runs on PHP, the programming language behind your site. Older PHP versions stop receiving security fixes, which leaves your site open to known problems. Most hosts let you switch PHP versions from the control panel. Move to a supported, recent version, and test your site afterwards to make sure everything still works.

6. Add a Web Application Firewall

A web application firewall, or WAF, sits between visitors and your site and blocks malicious requests before they reach WordPress. It can stop common attacks such as cross-site scripting and SQL injection. You can add a firewall as a plugin, or use a cloud-based service that filters traffic at the DNS level — the cloud option is usually easier and protects your server from ever seeing the bad traffic at all.

7. Hide Your WordPress Version Number

By default, WordPress announces which version you are running. That information helps attackers pick exploits that match your exact setup. Remove the version number from your site's code and headers so automated scanners cannot tell at a glance whether you are running an old, vulnerable release. Security plugins can do this for you.

8. Use a strong password to protect your WordPress blog

Weak passwords are still one of the top reasons sites get taken over. Avoid obvious choices such as your site name, "password" or simple number sequences. Use a long password mixing upper and lower case letters, numbers and symbols, and never reuse a password from another account. A password manager makes this easy: it can create and remember a different strong password for every login you own.

Never send your WordPress password to anyone over WhatsApp, email, or chat — not even to someone who says they are helping you with the site. If a developer or a helper needs access, create a separate account for them with only the access their job needs, and remove it when the work is finished. The same goes for your hosting login and your email password: sharing them hands over the whole site, not just one page. If you ever do share a password by mistake, change it right away and check the site for new accounts or changes you did not make.

9. Change the Default Login Address

Every WordPress site has the same login page address by default, which makes it easy for automated bots to find and hammer with password guesses. Moving your login page to a custom address cuts out a large share of brute-force attempts, because the bots never find the door. Several security plugins offer this as a simple setting.

9. Change the Default Login Address

10. Limit Login Attempts

Brute-force attacks work by trying thousands of passwords one after another. Limiting failed login attempts breaks that strategy: after a few wrong guesses from one address, that address is temporarily blocked. This single setting stops most automated guessing attacks in their tracks, and it is available in many free security plugins.

11. Set Up Alerts for New Indexed Pages

Attackers sometimes hack a site quietly and add hidden spam pages that only search engines see. You can catch this early by setting up a search alert for your own domain, so you get notified whenever a new page from your site appears in search results. If a page shows up that you did not create, investigate immediately.

12. Check File Permissions

Every file and folder on your server has permission settings that control who can read, write or run it. Permissions that are too open let attackers change your files if they find any way in. As a rule, folders should be writable only where WordPress truly needs it, and configuration files should be locked down. Your host's file manager or an FTP tool can show and adjust these settings.

13. Delete the Default Admin Account

Fresh WordPress installs used to create a user called "admin", and many sites still have one. Because attackers already know that username, they only need to guess the password. Create a new administrator account with a unique username, move your content to it, and remove the old "admin" user entirely.

14. Hide the Plugins Folder and Turn Off Database Errors

Two small cleanups close off useful information for attackers. First, stop visitors from browsing the contents of your plugins folder, which reveals exactly which plugins — and versions — you run. A small configuration file in that folder can block directory listings. Second, make sure database errors are not displayed on screen: error messages can leak details about your database structure that an attacker can use.

WordPress security tips to keep your site safe for good

No single tip makes a site unhackable, but together these fourteen steps remove the easy openings that most attacks rely on. The pattern is simple: back up, update everything, use strong and unique credentials, and add a firewall and login limits. Set a monthly reminder to review updates, check your backups and scan for anything unusual. A little routine maintenance now is far cheaper than recovering a hacked site later.

Zohaib FaisalZohaib Faisal is the founder and editor of EarnDesk. Based in Lahore, Pakistan, he runs the online store Haseeb Collections and works as a freelancer on Fiverr (virtual assistance, AI content writing, AI prompt engineering and digital marketing). He builds websites — Haseeb Collections, EarnDesk and a temporary-email service — writes SEO-focused content, and has hands-on AdSense experience across his sites. He has earned 15+ professional certificates from Google, IBM, Microsoft, HubSpot, Cisco, the Linux Foundation, Unity, Semrush and Harvard (CS50P), and creates the YouTube channel Clips by Zohaib. On EarnDesk he writes practical, honest guides to help beginners earn online — without hype or "get rich quick" promises. More about Zohaib.

Earning online takes time and consistent work. Results vary from person to person, and no method on this page guarantees any income. Treat every opportunity as a skill to build, not a shortcut.