Keep your software updated—this solves 80% of breaches
The single most effective security practice is keeping software updated. WordPress, plugins, themes, libraries, and operating system patches all matter.
Most successful hacks exploit known vulnerabilities with publicly available exploits. These vulnerabilities are patched within days or weeks. If you update regularly, you are simply not vulnerable to those attacks.
The problem is that many sites are not updated. A WordPress installation from two years ago might have 30+ patches worth of vulnerabilities. Each one is a potential entry point for attackers.
Automatic updates are your friend. Configure WordPress to update automatically. Set your plugin manager to update dependencies automatically. Let the operating system patch itself. You might miss a breaking change occasionally, but the security benefit far outweighs the small risk.
- Enable automatic security updates for WordPress, plugins, and operating system.
- Remove or disable unused plugins and themes—they are attack surface you do not need.
- Test updates in a staging environment before deploying to production if possible.
- Pin dependencies in code projects, but review security advisories regularly.
- Subscribe to security mailing lists for your frameworks and major dependencies.
Use strong, unique credentials everywhere
Weak or reused passwords are how attackers gain access. Enforce password requirements: at least 12 characters, mixing uppercase, lowercase, numbers, and symbols.
More importantly, use a different password for every system. If your WordPress admin password is the same as your hosting provider password, a breach in one compromises both.
Use a password manager to generate and store strong passwords. This is not optional—relying on memory means either weak passwords or password reuse.
For critical accounts like hosting admin, email, and WordPress admin, enable two-factor authentication. This means even if an attacker gets your password, they cannot log in without your phone or authenticator app.
Secure your hosting account and server
Your website is only as secure as the hosting account. If an attacker compromises your hosting account, they can modify files, plant malware, or steal data directly from the server.
Change default usernames and passwords immediately. Do not use "admin" for SSH or database accounts. Do not use "password" or "123456". Use long, random credentials.
Disable unnecessary services. SSH should not be accessible on non-standard ports, or better yet, from specific IP addresses only. FTP is insecure—use SFTP instead. Disable HTTP and force HTTPS.
Use firewall rules to restrict access. If your application only needs to connect to your database from specific application servers, restrict database access to those IPs only.
- Disable root login via SSH; use sudo instead.
- Change default SSH port and disable password authentication (use SSH keys).
- Use firewall rules to restrict inbound and outbound traffic.
- Enable logging for all administrative actions.
- Regularly audit user accounts and remove inactive ones.
- Keep the operating system and system libraries updated.
Protect your database
Databases contain your most sensitive data. A compromised database is a complete breach.
Do not expose your database to the internet. It should only be accessible from your application server. Use a private network or firewall rules to enforce this.
Use strong database passwords—treat them like API keys, not like user passwords. Use long, random credentials.
Backup your database regularly. At least daily. Store backups in a separate location so that if the server is compromised, you still have a clean copy.
Test that backups actually work. A backup that cannot be restored is worthless. Periodically restore a backup to a test server to verify the process.
Monitor for suspicious activity
Detection is as important as prevention. Even with good security, you need to know when something goes wrong.
Monitor file changes—if your application files are modified unexpectedly, that is a red flag. Monitor access logs for unusual patterns. If you see thousands of requests from a single IP to random URLs, that is someone scanning for vulnerabilities.
Set up automated malware scanning. Tools scan your files against known malware signatures. If something looks suspicious, you get an alert.
Monitor user accounts. If an admin account is created that you did not authorize, disable it immediately. If a plugin is installed without your knowledge, remove it.
Log everything. Application errors, database queries, SSH logins, file modifications. Store logs in a way that attackers cannot delete them—separate storage or read-only archival.
Bottom Line
These are the kinds of decisions that separate systems that age well from systems that become expensive to change.