If your WordPress site lives on shared hosting, you're in the statistically highest-risk environment: thousands of sites on the same server, relaxed defaults, and software that attracts automated attacks around the clock. The good news is that applying a basic hardening checklist cuts your hack probability by more than 80% — no dedicated server or advanced skills required.
This article covers exactly what you need to audit before an incident happens, organized into actionable steps you can complete in an afternoon.
Why WordPress on Shared Hosting Is an Easy Target
Shared servers group hundreds or thousands of domains under the same IP address and, frequently, the same system user. A compromised neighbor can serve as a foothold to move laterally if file permissions aren't properly isolated.
On top of that, WordPress attacks are almost entirely automated:
- Bots constantly scan
/wp-login.phpandxmlrpc.phpfor weak credentials. - Plugin exploits roll out in mass within hours of a CVE being published.
- Backdoor injections via file uploads in vulnerable plugins or themes.
The most common attack vector on shared hosting isn't your provider's infrastructure — it's your own outdated site or weak passwords.
Hardening Checklist: The 6 Essential Blocks
1. Updates Without Exception
WordPress core, themes, and plugins must always run their latest stable version. Enable automatic security updates for core from wp-config.php:
define( 'WP_AUTO_UPDATE_CORE', 'minor' );
For plugins, install Easy Updates Manager and configure automatic updates for security patches. Uninstall inactive plugins — not just deactivated, but fully deleted.
2. Correct File Permissions
Incorrect permissions are the most common backdoor on shared hosting. Safe values:
| Element | Correct Permission | Dangerous Permission |
|---|---|---|
| WordPress root directory | 755 | 777 |
| PHP files | 644 | 666 / 777 |
wp-config.php |
440 or 400 | 644 or higher |
wp-content/uploads directory |
755 | 777 |
From cPanel's File Manager or via SSH, you can fix them in bulk:
find /public_html -type d -exec chmod 755 {} \;
find /public_html -type f -exec chmod 644 {} \;
chmod 440 /public_html/wp-config.php
3. Protect wp-login.php and Disable xmlrpc.php
Add an HTTP basic auth layer to the WordPress login page and block xmlrpc if you don't use it (most sites don't). In your .htaccess:
# Block xmlrpc.php
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
</Files>
# Restrict wp-login.php by IP
<Files wp-login.php>
Order Deny,Allow
Deny from all
Allow from YOUR.IP.HERE
</Files>
If your IP is dynamic, enable two-factor authentication (2FA) with the WP 2FA plugin instead — it's more practical and nearly as secure.
4. Strong Passwords and Least-Privilege Users
- Replace the default
adminusername with something unique and unpredictable. - Use passwords of at least 16 characters, generated by a password manager (Bitwarden, 1Password).
- Assign authors and editors the minimum role they need — never "Administrator" for someone who doesn't require it.
- Enforce mandatory 2FA for all roles with publishing capability.
5. Security Plugin + Lightweight WAF
On shared hosting where you don't control the server firewall, a security plugin acts as an application-level WAF. The most reliable options in 2026:
| Plugin | WAF | Malware Scan | 2FA | Free Tier |
|---|---|---|---|---|
| Wordfence | Yes | Yes (real-time in Pro) | Yes | Yes (basic) |
| Solid Security (iThemes) | Partial | Yes | Yes | Yes |
| Sucuri Security | Yes (Pro/CDN) | Yes | Not native | Yes (scanning) |
Free Wordfence covers most small and medium sites. Pair it with free Cloudflare to add an extra WAF layer before traffic ever reaches your server.
6. Automated Offsite Backups
If you get hacked, your backup is your lifeline. Internal shared hosting backups aren't enough — an attacker with cPanel access can delete them. Use:
- UpdraftPlus with a remote destination (Google Drive, Dropbox, or S3) — set daily database backups and weekly file backups.
- Keep at least 30 days of history so you can roll back to a point before the infection.
- Test restoration at least once — a backup you've never tested doesn't really exist.
If you'd rather have a professional configure all of this for you, the team at elenlace.com offers WordPress maintenance and security services that include complete hardening from day one.
What to Do If You've Already Been Hacked
If you arrived here because you already have a problem, follow these steps in order:
- Put the site into maintenance mode immediately to stop infecting your visitors.
- Change all passwords: WordPress, cPanel, FTP, database.
- Scan with Wordfence or Sucuri to locate infected files.
- Restore from your last clean backup — if you have one. If not, clean manually with the scanner's guidance.
- Apply this full checklist before going live again.
- Notify your hosting provider — they sometimes have their own detection tools.
Find more hosting comparison guides and maintenance resources in our hosting and web tools comparisons section.
Key Takeaways
- The biggest shared hosting risk isn't your provider — it's your own outdated or misconfigured site.
- Correct permissions (644/755, wp-config at 440) close most lateral-access vectors.
- Blocking
wp-login.phpand disablingxmlrpc.phpeliminates 90% of automated attack traffic. - A WAF plugin + free Cloudflare is enough protection for small and medium sites.
- Without an external, tested backup, every other measure is incomplete.
- Mandatory 2FA for administrators delivers the highest security return for the effort invested.
Want a professional to audit and apply this checklist for you? Reach out at elenlace.com — we handle the audit, the hardening, and ongoing monitoring so you can focus on your business.
FAQ
Is a security plugin enough, or do I need more?
A security plugin is necessary but not sufficient on its own. It must be combined with correct file permissions, strong passwords, 2FA, and offsite backups. The plugin covers the application layer; the rest closes configuration and credential gaps.
Should I pay for Wordfence Premium or is the free version enough?
For most shared hosting sites, free Wordfence is sufficient. The Premium version updates malware signatures in real time (the free tier has a 30-day delay) and adds IP reputation protection. If you handle customer data or run e-commerce, the upgrade is worth considering.
How often should I run a security audit?
Review critical checkpoints (updates, permissions, users) monthly. Run a full malware scan weekly using your security plugin. After any major batch of plugin updates, check your logs for anomalous behavior.
Can I improve security without SSH access?
Yes. Most measures in this checklist apply directly from cPanel: permissions via File Manager, .htaccess editing with the built-in editor, and all plugin configuration from the WordPress dashboard. SSH speeds up the process but is not a requirement.
Further reading
Other providers and guides worth comparing: