Security advice often sounds like a list of scary warnings. This article tries to be different: an ordered checklist, with reasons, that a site owner can complete in an afternoon and revisit every quarter. Everything here has a direct link to search performance, because a compromised site is a site that loses visibility. Spam pages, malicious redirects, blocklist warnings and hosting suspensions all hurt rankings and trust. The October 2026 PHP security release, which fixed two critical remote code execution flaws, was a reminder that the stack beneath WordPress matters as much as the plugins on top. We start at the bottom of the stack and work upward.

Layer 1: hosting and PHP
Your hosting account is the foundation. Choose a host that patches PHP quickly, isolates accounts from each other and provides backups, a firewall and malware scanning. Ask how fast they applied the October 2026 fix and whether they restart PHP workers after patching; the answer is a good indicator of how seriously they take security.
Run a supported PHP branch. According to published support dates, 8.1 stopped receiving security fixes at the end of 2025, 8.2 stops at the end of 2026, 8.3 at the end of 2027, 8.4 at the end of 2028 and 8.5 at the end of 2029. Pick a branch with at least a year of support left that your plugins support. Check PHP in Tools, Site Health, Info.
Use HTTPS everywhere, with automatic certificate renewal, and redirect all HTTP URLs to HTTPS with a single 301. Mixed content warnings damage trust and can break features.
Layer 2: WordPress core, plugins and themes
Keep everything updated. Enable automatic updates for security and minor core releases, and for plugins that you trust, while testing major updates on staging. Remove any plugin or theme you do not use, including inactive ones and the default themes you never activate beyond one fallback. Avoid abandoned plugins: check the last update date and the support forum before you install.
Never install nulled or pirated premium plugins and themes. They are a leading source of pre-infected code. If budget is the problem, choose a maintained free alternative.
Limit plugin count by choosing multi-purpose tools carefully. One well-maintained SEO plugin that handles titles, schema, sitemaps and redirects is easier to keep updated than five separate ones.
Layer 3: logins and users
Most automated attacks try to guess passwords or reuse leaked ones. Defend with these steps.
Use unique, long passwords generated by a password manager for every account. Enable two-factor authentication for all administrators and editors; several reputable plugins and many hosts support it. Limit login attempts or use a firewall that blocks repeated failures. Rename or remove the default admin username if it still exists. Give each person their own account with the lowest role they need, and remove accounts when people leave. Review the user list monthly for unfamiliar administrators, because creating a new admin is a typical attacker move after a break-in.
If you do not need public registration, turn it off in Settings, General. If you do, set the default role to subscriber and protect the form from spam.
Layer 4: files and configuration
Disable the file editor inside the WordPress admin by adding the disallow file edit constant to the configuration file, so an attacker who gets into the dashboard cannot rewrite plugin code directly. Set safe file permissions: files typically 644 and directories 755, with the configuration file stricter if your host allows. Move or protect the configuration file where possible. Generate fresh authentication keys and salts, especially after any incident, and store the database credentials securely.
Block PHP execution in the uploads folder. That directory should hold media only, and attackers frequently plant scripts there. Your host or a server rule can deny execution. Keep directory listings off so visitors cannot browse folders.
Remove files you do not need: old backups left in the web root, readme files that reveal versions, installer scripts, and any phpinfo test files. Anyone can request these URLs.
Layer 5: database and secrets
Use a unique database prefix if you are building a new site and a strong, unique database password. Limit database user privileges to what WordPress needs. Never reuse database passwords across sites. Rotate secrets after any suspected compromise, including API keys stored in options and the keys used by payment or email plugins. The PHP2Shell reports specifically advised rotating secrets held in application memory after possible exposure, because one flaw can leak them.
Layer 6: firewall and monitoring
A web application firewall filters malicious requests before they reach WordPress. It can be a cloud service in front of your site, a host-level firewall or a plugin. After the PHP2Shell disclosure, at least one major provider released rules for known exploit patterns to all customers, including those on free plans. A firewall is not a substitute for patching, but it buys time and blocks a lot of noise.
Monitoring tells you quickly when something changes. Use uptime monitoring with content checks, enable file change detection or malware scanning, and review security and manual action messages in Search Console. Watch for alerts about new indexed pages or sudden spikes in crawl activity.
Layer 7: backups and recovery
Backups are your safety net. Back up files and database daily for active sites, store copies off the server, keep several generations and test a restore at least twice a year. A backup you cannot restore is not a backup. Our separate guide on backups covers retention and testing in detail.
Layer 8: SEO-specific security checks
Because hackers often target search visibility, add these checks to your routine.
Search Google for your domain combined with common spam words and see whether unfamiliar pages appear. Check Search Console’s Pages report for sudden jumps in indexed URLs and its Security issues and Manual actions reports. Use a site audit to find unexpected pages, redirects and outbound links. Review your link report for external links you did not add. Look at your robots file with the robots.txt tool to confirm nobody changed it, and verify titles and descriptions of key pages with the meta tag checker. Hidden spam often appears in these places first.
Check your 404 monitor in your SEO plugin for clusters of unusual URLs, which can signal scanning for vulnerabilities or injected pages.
Layer 9: people and process
Technology fails when people are not prepared. Decide who is responsible for updates, who has admin access, who talks to the host and what the escalation path is. Write a short incident plan with host contacts, backup locations and the steps to put the site into maintenance mode. Train anyone with login access to recognize phishing emails that mimic hosting or WordPress notices.
A quarterly review
Every three months: check PHP and plugin versions, remove unused plugins and users, verify backups restore, review firewall and uptime reports, check Search Console security sections, run an audit, and rotate any shared passwords. Record the date. Fifteen minutes each quarter prevents most emergencies.
What to do first if you only have an hour
- Confirm your PHP branch is supported and patched.
- Update WordPress, plugins and themes, and delete unused ones.
- Enable two-factor login for admins.
- Verify that a recent off-server backup exists.
- Turn on a firewall or confirm your host provides one.
- Check Search Console for security messages.
Frequently asked questions
Is a security plugin enough? No. It helps with scanning and blocking, but patching, strong logins and backups matter more.
Do I need two-factor authentication on a small site? Yes. Stolen passwords are a top cause of break-ins, and two-factor stops most of them.
Can security settings hurt SEO? Only if misconfigured, for example by blocking crawlers or returning errors for bots. Test after changes.
How often should I scan for malware? Daily automated scans are common, plus a manual review after any incident.
What matters most in the end? Patching, strong authentication and tested backups.




Comments