1. HTTPS Everywhere — The Non-Negotiable Foundation
HTTPS encrypts all data transmitted between your visitors' browsers and your web server. Without it, form submissions, login credentials, session cookies, and any data users share with your site can be intercepted by anyone on the same network — a coffee shop WiFi, a corporate proxy, a compromised router. For a business website collecting contact form data, appointment bookings, or any personal information, HTTP is not an acceptable baseline.
SSL/TLS certificates are now free through Let's Encrypt and are automatically provisioned by most modern hosting providers. Install a valid certificate, set up a server-level 301 redirect from HTTP to HTTPS (every HTTP URL should automatically redirect to its HTTPS equivalent), and audit for mixed content — any resources (images, scripts, stylesheets) still loading over HTTP on an HTTPS page will trigger browser security warnings and partially negate your HTTPS implementation.
Add the Strict-Transport-Security (HSTS) response header to instruct browsers to only ever connect to your domain over HTTPS, even if a user manually types "http://". A recommended HSTS configuration: max-age=31536000; includeSubDomains. This prevents downgrade attacks where an attacker tries to force a fallback to HTTP. Once HSTS is set, remove it only carefully — it persists in browsers for the full max-age duration.
2. Software Updates — Your Highest-Impact Security Habit
The vast majority of website compromises exploit known, documented vulnerabilities in outdated software — not sophisticated zero-day attacks. Outdated WordPress plugins account for 56% of WordPress hacks according to WPScan data. PHP end-of-life versions. Themes abandoned by their developers with years of unpatched vulnerabilities. The remediation is straightforward: keep everything updated.
Enable automatic updates for security releases and minor versions of your CMS core. Subscribe to security advisories for every plugin and theme you use — most major plugins have official security advisories or changelog entries that flag security releases. Maintain a complete inventory of all installed software including version numbers, and review it monthly against known vulnerability databases (WPScan, CVE). Remove plugins and themes you don't actively use — inactive software is still attack surface, and developers stop supporting abandoned plugins.
PHP version is frequently overlooked. Running PHP 7.4 or 8.0 on a current site means running software that is end-of-life, receives no security patches, and is increasingly incompatible with modern plugins. Check your PHP version in your hosting control panel and upgrade to the current stable release. Most WordPress sites upgrade PHP with zero issues; the cases where it breaks something are almost always due to an outdated plugin that needed updating anyway.
3. Access Control — Passwords, MFA, and Least Privilege
Credential attacks are among the most common entry points for website compromises. Automated bots continuously try username/password combinations against WordPress login pages, cPanel logins, and database interfaces. Weak, reused, or default passwords fall quickly against these attacks. The good news is that two measures — strong unique passwords and multi-factor authentication — block the overwhelming majority of these attacks at negligible cost.
Require strong passwords (minimum 16 characters, generated by a password manager) for all accounts with access to your site: WordPress admin, hosting cPanel, FTP/SFTP, database management, and domain registrar. Never reuse passwords across services. Enable multi-factor authentication (MFA) on every service that supports it — this single measure blocks approximately 99% of automated credential-stuffing attacks even when a password is compromised in a third-party data breach.
Apply the principle of least privilege to all user accounts. A content editor doesn't need administrator access. A developer working on a plugin doesn't need database superuser access. An agency managing your SEO doesn't need server-level credentials. Review all user accounts quarterly, remove accounts that are no longer needed (former employees, past contractors), and downgrade permissions to the minimum required for each role. Many SMB sites accumulate dormant admin accounts over years — each is a potential entry point.
"Security is not a feature you add to a website. It's a practice you maintain. The difference between a secure site and a vulnerable one is often nothing more than consistent, boring hygiene."
4. Regular Backups — Your Last Line of Defense
When every other security measure fails — and eventually, for most sites, something will — backups are what determine whether a security incident costs you hours or weeks. A clean, tested, recent backup means recovery is a restore operation. Without backups, recovery means forensic analysis, manual reconstruction of content, potential regulatory reporting, and sometimes accepting permanent data loss.
Automate daily backups of both your database (which contains all your content and configuration) and your files (which contain your theme, plugins, and uploads). Store backups off-site — not on the same server as your website. If your server is compromised, backups stored on that server are compromised too. Store backups in at minimum two locations: your hosting provider's backup system plus an independent cloud storage service (Dropbox, Google Drive, S3, Backblaze).
Retain at least 30 days of backup history. Some security incidents — particularly injected SEO spam or backdoor malware — aren't discovered until weeks after the initial compromise. If you only keep 7 days of backups, your restore points may all be from after the infection. The 30-day retention window gives you clean restore points that predate most discovered incidents.
Most critically: test your restore procedure. A backup you've never restored is a backup of unknown quality. Many hosting providers' backup systems have silent failures, corrupted archives, or missing databases that only become apparent at restoration time. Perform a test restore to a staging environment every quarter. Know exactly how long a restore takes and what the procedure is before you need to do it under pressure.
5. Web Application Firewall (WAF) and Malware Scanning
A Web Application Firewall sits in front of your website and inspects incoming traffic, blocking requests that match known attack patterns before they ever reach your application. This means SQL injection attempts, cross-site scripting (XSS) payloads, brute-force login attempts, and many automated scanning tools are stopped at the perimeter. Cloudflare's free tier includes a basic WAF and is the simplest starting point for any business website — you can add it without changing your hosting provider.
For WordPress sites, Wordfence (free tier available) provides both a WAF and malware scanning integrated directly into WordPress. It blocks common attack patterns, detects file changes that indicate compromise, and scans your installation against the known WordPress core file checksums to identify tampered files. Sucuri provides similar capabilities as a cloud service, and Imunify360 provides server-level protection through many managed hosting providers.
Active malware scanning is particularly important because many infections are subtle. Attackers who compromise a site often inject code that is invisible during normal use: hidden links for SEO spam that only appear to Googlebot, redirects that only trigger for mobile users or users arriving from search engines, or cryptomining scripts that run in background tabs. These compromises may go undetected for months without active scanning. Automated weekly malware scans catch these infections before they cause significant SEO damage or customer trust issues.
6. Harden Your Configuration
Default configurations are designed for compatibility and ease of setup, not for security. Most web servers and CMS installations ship with settings that expose more information than necessary and leave common attack vectors open. Configuration hardening closes these gaps methodically without requiring code changes or ongoing maintenance.
Disable directory listing on your web server — this prevents attackers from browsing your file structure when there's no index file in a directory. Restrict direct access to sensitive files and directories (WordPress's wp-config.php, .env files, .git directories). Implement a Content Security Policy (CSP) header to restrict what scripts, styles, and resources can load on your pages — this prevents XSS attacks from injecting malicious scripts even if an attacker finds an injection point.
Add these security response headers to every page: X-Frame-Options: SAMEORIGIN (prevents clickjacking by blocking your pages from being loaded in iframes on other domains); X-Content-Type-Options: nosniff (prevents MIME type sniffing attacks); Referrer-Policy: strict-origin-when-cross-origin (controls what referrer information is sent to external sites). These headers are set once in your server or CDN configuration and provide ongoing protection with zero maintenance burden.
For cookies: session cookies should use the HttpOnly flag (prevents JavaScript from reading session cookies, blocking many XSS-to-session-theft attacks), the Secure flag (cookies only transmitted over HTTPS), and SameSite=Strict or SameSite=Lax (prevents Cross-Site Request Forgery attacks). These are server-side settings that apply globally once configured.
7. Database and Application Security
SQL injection remains one of the most common web application vulnerabilities, particularly in custom or older code. It occurs when user-supplied input is incorporated into database queries without proper sanitization, allowing attackers to manipulate the query — reading sensitive data, bypassing authentication, or deleting records. The remediation for SQL injection is parameterized queries (prepared statements): never concatenate user input directly into SQL strings.
WordPress's database API ($wpdb->prepare()) handles parameterization correctly when used as intended. Custom plugins that bypass this abstraction are high-risk. Audit any custom code for direct string concatenation in database queries — this is the pattern to eliminate. Cross-site scripting (XSS) vulnerabilities, where user-supplied content is output back to the browser without escaping, are the other most common application-layer vulnerability: always escape output using the appropriate function for the context (HTML, JavaScript, URL, attribute).
Limit database user permissions: your website's database user should have only SELECT, INSERT, UPDATE, and DELETE permissions on your site's tables — not CREATE TABLE, DROP, or administrative access. This limits the blast radius if your application is compromised: an attacker who gains your database credentials can manipulate your site's data, but cannot drop your database entirely or access other databases on the same server.
8. Monitoring and Alerting
Security that you don't monitor is security that fails silently. Implementing defenses and then never checking whether they're working leaves you with an illusion of security rather than actual security. Effective monitoring means you're notified when something goes wrong rather than discovering an incident after a customer reports it — or after Google flags your site as "dangerous" in search results.
Set up uptime monitoring (UptimeRobot free tier is sufficient for most SMBs) to alert you when your site goes down — unexpected downtime is often the first visible indicator of a serious security incident. Enable login attempt logging and configure alerts for repeated failed login attempts. Wordfence and Sucuri both provide email alerts for blocked attacks and file changes.
Use Google Search Console to monitor for security warnings and manual actions. Google will notify you through Search Console if it detects malware or security issues on your site, and will de-list your pages from search results until the issue is resolved. Subscribe to these notifications and check Search Console weekly. Set a Google Alert for your brand name to catch instances where your site is being used to spread spam — sometimes compromised sites are used for this and the damage to your brand reputation begins before you're aware of the compromise.
9. Incident Response Planning — Before You Need It
The organizations that recover fastest from security incidents are the ones that had a response plan before the incident occurred. Under the pressure of an active compromise — with your site serving malware to customers, your search rankings collapsing, and your hosting provider threatening to suspend your account — is not the time to figure out your recovery procedure for the first time. A documented plan, however simple, dramatically reduces recovery time and the mistakes made under stress.
Your incident response plan should document: who is responsible for security decisions; how to take your site offline or put it in maintenance mode quickly; your backup restore procedure and how long it takes; who to notify (hosting provider, payment processor if applicable, regulatory body if personal data is affected); and your external escalation contacts (a security professional or your web developer). Store this document somewhere accessible when your site and email might be down — a printed copy, a Google Doc shared with key team members.
After any incident, conduct a postmortem to identify the root cause and close the gap that allowed the compromise. Most security incidents are caused by one of a small set of recurring issues: outdated software, reused or weak credentials, unmonitored third-party integrations, or social engineering. Addressing the root cause prevents the same incident from recurring, which is more valuable than any amount of detective work after the fact.
Website Security Audit Checklist
- HTTPS enabled with valid SSL certificate and HTTP?HTTPS 301 redirects
- HSTS header configured (
Strict-Transport-Security) - All CMS core, plugins, and themes updated to latest versions
- PHP version current (8.2+ recommended for WordPress)
- MFA enabled on WordPress admin, hosting cPanel, and domain registrar
- No unused plugins or themes installed
- Daily automated backups to off-site storage, 30-day retention
- Backup restore procedure tested on staging environment
- WAF enabled (Cloudflare or Wordfence minimum)
- Automated malware scanning configured with email alerts
- Security headers: CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy
- Directory listing disabled on web server
- Cookie security flags: HttpOnly, Secure, SameSite
- User accounts audited — no dormant accounts with admin access
- Uptime monitoring with alerts configured
- Google Search Console security notifications enabled
- Written incident response plan stored off-server