◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Security → CIS Benchmarks
CIS benchmarks for WordPress: What it means and where to start
WordPress is the most popular website platform in the world—and that makes it a huge target for hackers. If you want to take WordPress security seriously, you might’ve come across something called CIS Benchmarks. But what are they? And how do they help protect your site?
Let’s walk through what CIS Benchmarks are, why they matter for WordPress users, and how you can start using them to improve your site’s security.
What are CIS Benchmarks?
CIS Benchmarks are a collection of best practices for securing systems and software. They’re designed to help you lock down your server or application and reduce the chances of being hacked.
What does CIS stand for?
CIS stands for Center for Internet Security, a nonprofit organization that creates detailed security guidelines for operating systems, software, cloud platforms, and more.
How do CIS Benchmarks work?
Each benchmark is a step-by-step checklist of actions you can take to make a system more secure. They’re created by a global community of security experts and IT professionals, and go through peer review before being published.
Benchmarks are usually divided into two levels:
- Level 1: Basic security measures that should work for most users without breaking anything.
- Level 2: Stricter security settings intended for advanced users or high-risk environments.
Why should WordPress users care?
Even though CIS doesn’t have a specific WordPress Benchmark, many WordPress sites run on servers and software that do have official benchmarks—like Linux, Apache, NGINX, PHP, and MySQL. That means you can still use CIS recommendations to secure the environment WordPress runs in.
Does WordPress have its own CIS Benchmark?
No, CIS doesn’t offer a benchmark specifically for WordPress core, themes, or plugins. But that doesn’t mean you’re out of luck.
WordPress typically runs on something called a LAMP or LEMP stack:
- LAMP: Linux, Apache, MySQL, PHP
- LEMP: Linux, NGINX (pronounced “Engine-X”), MySQL, PHP
Each of those layers has a published CIS Benchmark. By following them, you can improve the security of your WordPress environment from the ground up.
You’ll still need to follow WordPress-specific best practices for things like plugins and user roles, but CIS Benchmarks are an excellent foundation.
7 CIS-based security practices to apply to WordPress
Here’s how to use CIS guidance to harden the server stack that powers your WordPress site. We’ll go layer by layer, starting with the operating system.
1. Harden your Linux server
Most WordPress hosting is built on a Linux-based operating system like Ubuntu, CentOS, or Debian. You can apply these Linux-focused security practices:
- Disable unused services: Turn off anything your server doesn’t need—like FTP, Bluetooth, or SNMP—to reduce your attack surface.
- Set up a firewall: Use ufw (Uncomplicated Firewall) to only allow traffic on ports you need—usually 80 (HTTP), 443 (HTTPS), and 22 (SSH).
- Enable automatic security updates: Keeps your system patched against known vulnerabilities. On Ubuntu, this can be done with unattended-upgrades.
- Install Fail2Ban: Protects against brute-force login attempts by banning IPs that fail too many times.
2. Secure your PHP settings
PHP is the programming language WordPress runs on. Improper PHP configuration can leave you vulnerable.
- Disable dangerous functions: Edit php.ini and disable risky commands like exec, shell_exec, system, and passthru.
- Hide PHP version info: Set expose_php = Off so attackers don’t see which PHP version you’re running.
- Limit file access: Use the open_basedir directive to restrict what folders PHP can read or write to.
To apply these changes:
- Open your php.ini file (location varies by OS).
- Make edits as needed.
- Restart your web server to apply the changes.
3. Lock down MySQL or MariaDB
Your WordPress site stores all its content in a MySQL-compatible database. Here’s how to make that safer:
- Remove anonymous users: Run mysql_secure_installation to delete default users and set a root password.
- Disallow remote root login: Only allow root access from localhost.
- Use strong passwords: For the WordPress database user, always use a long, random password.
- Limit user privileges: The WordPress database user should only have permissions it absolutely needs (usually SELECT, INSERT, UPDATE, DELETE).
4. Harden Apache or NGINX
Your web server software (Apache or NGINX) controls how traffic reaches your WordPress site. Harden it by:
- Disabling directory listing: Prevents visitors from seeing the contents of folders without index files.
- Restricting HTTP methods: Limit allowed methods to GET, POST, and maybe HEAD—deny things like TRACE, PUT, and DELETE.
- Adding a Web Application Firewall (WAF): Use mod_security for Apache or NAXSI for NGINX to block malicious requests.
Most of these can be set in your web server’s main config file or in .htaccess.
5. Configure strong file permissions
CIS recommends minimizing file access wherever possible.
- Set folders to 755 and files to 644: This gives the server the access it needs without overexposing anything.
- Lock down wp-config.php: This file contains your database credentials. Use chmod 600 wp-config.php to limit access.
- Deny write access to .htaccess and .htpasswd if you use them.
You can set permissions from your terminal or via an FTP client.
6. Enforce HTTPS and use secure headers
Encrypting traffic and securing browser behavior helps protect users.
- Install an SSL certificate: Let’s Encrypt is free and widely supported.
- Redirect HTTP to HTTPS: Force all traffic to use encryption.
- Add headers for extra security:
- Strict-Transport-Security (HSTS): Tells browsers to only use HTTPS.
- X-Frame-Options: Prevents clickjacking.
- X-Content-Type-Options: Stops MIME-sniffing.
You can add these headers in your .htaccess file (Apache) or nginx.conf (NGINX).
7. Monitor and log everything
Logging helps you detect and respond to suspicious activity.
- Enable access and error logs: On Apache or NGINX, logs are usually in /var/log/apache2/ or /var/log/nginx/.
- Use WordPress activity log plugins:
- Watch for file changes: Tools like Wordfence can alert you when files are altered.
Tools that help apply CIS Benchmarks
You don’t have to configure everything manually. These tools can speed things up:
- Lynis: A free Linux auditing tool that scans for CIS Benchmark compliance.
- OpenSCAP: Automates system checks against benchmark rulesets.
- WPScan: Finds WordPress-specific vulnerabilities.
- Security plugins:
Where CIS Benchmarks fall short for WordPress
CIS Benchmarks are incredibly helpful, but they’re not the whole story.
- No WordPress-specific rules: They don’t cover plugins, themes, or user roles.
- No update strategy: Keeping WordPress core and plugins updated is essential, but not part of CIS.
- Not beginner-friendly: The official PDFs can be technical and overwhelming if you’re not used to server management.
Use CIS as a base, then add WordPress-specific security practices to fill in the gaps.
Getting started with CIS Benchmarks for WordPress
CIS Benchmarks help you build a secure foundation for your WordPress site by locking down the server environment it runs on. While WordPress itself doesn’t have an official benchmark, applying the ones for Linux, PHP, MySQL, and your web server goes a long way toward protecting your site.
If you’re new to server security, start with Level 1 recommendations from the relevant benchmarks and work your way up. Managed WordPress hosting is also a great option if you’d rather not deal with server configuration.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
Comprehensive guide to securing WordPress with ModSecurity
→
This guide provides a comprehensive overview of how to use ModSecurity to enhance the security of your WordPress site.
WordPress vulnerability scanners →
Learn how a WordPress vulnerability scanner protects your site by detecting and addressing security risks early.
Why security matters for WordPress enterprise hosting
→
Use the blog as your guide to attacks to watch out for, security best practices, and steps to improve the WordPress protection you already have.
Lindsey Miller is the former Partner Manager for Liquid Web Managed WordPress Hosting. She’s been involved in various aspects in the WordPress community for over 7 years and helped start a non-profit teaching kids to code, The Div.