12 WordPress Security Basics Every Site Owner Should Know
Twelve routine habits that stop most attacks on a typical WordPress site. If your WordPress site gets hacked, it probably wasn't personal. Most attacks come from automated bots that crawl the web around the clock, testi
Twelve routine habits that stop most attacks on a typical WordPress site.
If your WordPress site gets hacked, it probably wasn't personal. Most attacks come from automated bots that crawl the web around the clock, testing thousands of sites an hour for outdated plugins, weak passwords and exposed login pages.
The good news: bots go after easy targets. A simple, repeatable routine shuts most of those doors, and you don't need to be a developer to follow it. Here are the twelve basics every site owner should have in place.
1. Keep WordPress core, themes and plugins updated
Outdated plugins are the number one way WordPress sites get broken into. Switch on automatic updates for minor core releases and for plugins you trust. Set aside a few minutes each week to review and apply everything else.
2. Delete what you don't use
A deactivated plugin or theme is still code sitting on your server, and it can still be exploited. If you're not using it, remove it completely. Less code means fewer weak spots.
3. Lock down your login page
Give every administrator a long, unique password and turn on two-factor authentication. Limit failed login attempts so bots can't keep guessing forever. And retire the username "admin", because it's the first one every bot tries.
4. Give people only the access they need
Not everyone needs to be an administrator. A content writer needs Editor or Author rights, not full control of the site. The fewer powerful accounts you have, the less damage one stolen password can do.
5. Back up off-site, and actually test the restore
A backup you've never restored is just a hope. Store copies away from your hosting server and keep several days of history. Then run one test restore on a staging site, so you already know the steps before a real emergency.
6. Serve everything over HTTPS
Run the entire site on HTTPS and redirect all plain HTTP traffic to it. While you're at it, add security headers such as Strict-Transport-Security and X-Content-Type-Options at the server level. They take minutes to set up and close off common browser-based attacks. The official WordPress hardening guide covers file permissions and other server settings worth applying too.
7. Protect your most sensitive files
Your wp-config.php file holds your database credentials, so keep it out of public reach. Disable the theme and plugin file editor inside the dashboard, and set file permissions so the web server can only write where it truly needs to. If no app relies on XML-RPC, switch it off.
8. Set up a firewall and alerts
Install a reputable security plugin or use a server-level firewall. Turn on alerts for new administrator accounts and unexpected file changes. Catching a problem early turns a breach into a quick cleanup instead of a long recovery.
9. Audit users and integrations every quarter
Forgotten accounts are an easy way in. Every three months, review your user list and remove anyone who no longer works with you, including former freelancers and contractors. Check which plugins connect to outside services and revoke any access tokens you no longer need. Every account and integration is one more thing to defend.
10. Choose hosting that protects you
Your host is part of your security. Look for isolated accounts, regular server updates and simple restores. Avoid shared setups where one infected site can spread to its neighbors, and favor hosts that include malware scanning and a web application firewall.
11. Know the warning signs of a hacked site
Attacks aren't always obvious. Watch for these red flags:
- Administrator accounts you didn't create
- Pages or posts containing strange links
- Spammy titles showing up for your domain in search results
- Sudden slowdowns with no clear cause
- Browser warnings when visitors land on your site
- Alerts from your host about malware or unusual outgoing email Also verify your site in Google Search Console, which reports any security issues it detects.
12. Have a recovery plan before you need one
If the worst happens, work through it in this order:
- Take the site offline. Switch on maintenance mode or ask your host to suspend it, so visitors aren't exposed.
- Change every password. That means WordPress users, hosting, database, FTP or SSH, and the recovery email accounts.
- Restore a clean version. Use a backup from before the problem began, or replace core files and plugins with fresh copies from official sources.
- Clean up. Update everything, delete unused code, and remove any accounts or scheduled tasks you don't recognize.
- Find the way in. Restoring the site without closing the gap invites a repeat attack. The cause is usually an outdated plugin or a reused password, and your logs or host's support team can often pinpoint it.
- Notify if needed. If customer data may have been exposed, check the notification rules where you operate and inform the people affected.
Keep a short written emergency checklist with your host's support contact, where your latest backup lives, and who has the authority to take the site offline. When every minute counts, you'll be glad those details are already written down. Update it whenever your hosting or team changes.
Bonus: when your site needs more than the basics
Sites with custom plugins, membership areas or payment flows carry extra risk, and professional code review matters more there. A WordPress development company can take on that kind of work. Full disclosure: that link points to a company I'm affiliated with, and it's just one example of this type of service.
The bottom line
You don't have to outrun every attacker, just the bots looking for an easy win. Work through this list once a quarter, and most automated attacks will move on to a softer target.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.