X

Select Your Currency

Euro $ US Dollar £ British Pound
X

Select Your Currency

Euro $ US Dollar £ British Pound
❄️ Winter Launch: Get 50% OFF First Month on 8GB+ RAM NVMe VPS Plans! Use Code: WELCOME50

WordPress Security: 10 Essential Tips to Protect Your Site

HomepageArticlesWebsite DevelopmentWordPress Security: 10 Essential Ti...

WordPress Hardening: 10 Advanced Security Tips for VPS & DirectAdmin Users

WordPress powers over 40% of the web, making it the #1 target for bots and script kiddies. Most "security guides" just tell you to install a plugin. But as a hosting provider, we know that true security happens at the Server Level.

You don't need to be a security guru to lock down your site. Here are 10 critical steps to turn your WordPress into a digital fortress, including .htaccess rules and config hacks that actually work.


1. Start with Isolated Hosting (VPS vs Shared)

The biggest risk in cheap hosting is "neighbor effect." If one site on a shared server gets hacked, yours might be compromised too.

At ErkmenHost, we recommend using a Cloud VPS. This gives you isolated resources, dedicated IP, and full control over your firewall rules. You can't build a strong fortress on a shared foundation.

2. Disable XML-RPC (The #1 DDoS Door)

Most brute-force attacks target the xmlrpc.php file. Unless you use the WordPress mobile app or Jetpack, you don't need this.

The Fix: Add this code to your .htaccess file to block it instantly:

# Block WordPress XML-RPC
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
</Files>

3. Lock Down wp-login.php by IP

Why let the whole world see your login page? If you have a static IP, you can allow only yourself to access the dashboard.

The Fix: Add this to .htaccess:

<Files wp-login.php>
Order Deny,Allow
Deny from all
Allow from 123.45.67.89
</Files>

(Replace 123.45.67.89 with your actual IP address).

4. Disable File Editing in Dashboard

If a hacker gets into your admin panel, the first thing they do is go to Appearance > Theme Editor to inject malware into your functions.php.

The Fix: Disable this feature by adding this line to your wp-config.php file:

define( 'DISALLOW_FILE_EDIT', true );

5. Correct File Permissions (The 644/755 Rule)

Wrong permissions are an open door. Never set folders to 777.

  • Directories: Should be 755
  • Files: Should be 644
  • wp-config.php: Should be 400 or 440 for maximum security.

You can fix this recursively via SSH on our VPS plans using these commands:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

6. Change the Default Database Prefix

By default, WordPress uses `wp_` for database tables. Automated SQL injection bots target this. Changing it to something random (e.g., `eh82_`) makes automated attacks fail.

Tip: If you use Softaculous in our DirectAdmin panel, you can set this automatically during installation.

7. Enable Free SSL (Let's Encrypt)

SSL is non-negotiable. It encrypts data between the user and the server.

At ErkmenHost, all our hosting plans come with Automatic Free SSL powered by Let's Encrypt. You don't need to pay extra or configure it manually; DirectAdmin handles the renewal for you.

8. Hide Your WordPress Version

Outdated versions have known vulnerabilities. Don't advertise which version you are using in the page source code.

The Fix: Add this to your theme's functions.php:

remove_action('wp_head', 'wp_generator');

9. Use a Web Application Firewall (WAF)

Plugins are okay, but a Server-Side WAF is better. Our servers are protected by hardware firewalls, but using Cloudflare (Free) as an extra layer adds protection against DDoS and bot traffic before it even hits your VPS.

10. Automated Backups (Your Safety Net)

No security is 100% perfect. If things go south, you need a snapshot.

Don't rely solely on WordPress plugins for backups (they slow down your site). Use the Server-Level Backup tools available in our DirectAdmin panel to create daily snapshots of your entire account.


Secure Your Business with Premium Infrastructure

Security starts with the server. Stop worrying about shared hosting vulnerabilities.

Get Isolated NVMe VPS

Deploy a secure, isolated WordPress environment on ErkmenHost's NVMe Cloud Servers. Full root access, dedicated IP, and total control.

View VPS Plans


Top