Alex Morgan
Alex Morgan
Senior Hosting Analyst
10+ years testing web hosting infrastructure. Benchmarks servers across 4 continents.

كيفية تأمين ووردبريس 2026

WordPress powers 43% of the web, which makes it the most targeted platform for hackers. But most attacks are automated, opportunistic, and preventable. They exploit known vulnerabilities in outdated plugins, weak passwords, and default configurations. Securing WordPress properly takes under 2 hours and dramatically reduces your attack surface. These 10 steps, in order of impact, cover the most common attack vectors.

كيف تحققنا من هذه الخطوات

قبل النشر ننفّذ كل خطوة على علامتين على الأقل إذا كانت مرتبطة بالمضيف. أو مرتين في يومين مختلفين إن لم تكن. نسجّل أخطاء وحدة التحكم، اختلاف واجهة المناطق، ونحدّث النص فور تحريك زر. المسارات واللقطات تُراجع ربع سنوي. لأفعال DNS أو SSL أو الدفع نتحقق من خيارات التراجع ونربط بالوثائق الرسمية.

  1. 1

    Step 1: Keep WordPress, themes, and plugins updated

    The single most effective security measure. Over 50% of WordPress hacks exploit vulnerabilities in outdated plugins and themes. Enable automatic updates: Plugins → select all → Bulk Actions → Enable Auto-updates. For WordPress core, in wp-config.php add `define('WP_AUTO_UPDATE_CORE', true);`. Before enabling auto-updates, ensure you have automated backups running so you can revert if an update causes issues.

  2. 2

    Step 2: Use strong passwords and a password manager

    All WordPress accounts should use 20+ character randomly generated passwords. Use a password manager (Bitwarden is free and excellent, 1Password is premium). Never reuse passwords across sites. Change your database password to something complex in wp-config.php and in your hosting control panel. Your wp-config.php database password doesn't change how WordPress logs in. It's a separate credential.

  3. 3

    Step 3: Install a security plugin

    Install Wordfence Security (free tier is comprehensive) or Solid Security (formerly iThemes Security). Enable: malware scanning, login security, brute force protection, and file change detection. Run the initial security audit and fix all flagged issues. Schedule weekly malware scans. These plugins detect many attacks before they cause damage and alert you to suspicious activity.

  4. 4

    Step 4: Enable two-factor authentication (2FA)

    Add 2FA to your WordPress admin login. even if your password is compromised, attackers cannot log in without your phone. Wordfence Security and Solid Security both include 2FA. Alternatively, install WP 2FA plugin. Use an authenticator app (Google Authenticator, Authy) rather than SMS. SMS is vulnerable to SIM-swap attacks.

  5. 5

    Step 5: Change the admin username and limit login attempts

    The username "admin" is targeted by every automated brute-force attack. If your account uses "admin": create a new administrator account with a different username, log in as the new user, delete the old "admin" account (reassign posts to the new user). Then use your security plugin's brute-force protection to lock out IPs after 5 failed login attempts.

  6. 6

    Step 6: Move or hide the wp-admin login page

    Automated bots constantly probe /wp-admin and /wp-login.php. Wordfence and Solid Security can limit login page access to specific IP addresses or add a secret key to the login URL (e.g. yourdomain.com/wp-login.php?secret=yourkey). Alternatively, use a WAF (Cloudflare) to block login page access from all IPs except your office/home IP using firewall rules.

  7. 7

    Step 7: Implement a Web Application Firewall (WAF)

    A WAF filters malicious traffic before it reaches your server. Cloudflare's free plan includes a basic WAF and DDoS protection. Wordfence Security includes a WordPress-specific WAF that blocks known attack patterns. Cloudflare + Wordfence together provide defence in depth. Cloudflare blocks network-level attacks, Wordfence handles application-level attacks.

  8. 8

    Step 8: Disable file editing and PHP execution in uploads

    Two lines in wp-config.php: `define('DISALLOW_FILE_EDIT', true);` removes the theme/plugin code editor from wp-admin (prevents attackers who gain WP access from injecting code). Block PHP execution in uploads folder by adding a .htaccess in wp-content/uploads/: `<Files *.php>` / `deny from all` / `</Files>`. This blocks a common malware injection technique.

  9. 9

    Step 9: Set up automated backups stored off-server

    Backups are your last line of defence if prevention fails. Install UpdraftPlus and configure: daily backups, retention of 7 copies, remote storage to Google Drive or Amazon S3 (off your web server. A compromised server backup is useless). Test restoring from backup at least once so you know the process works before you need it under pressure.

  10. 10

    Step 10: Monitor for changes and scan regularly

    Enable Wordfence's email alerts for: admin account creation, login from unknown location, plugin/theme file changes, and failed login spikes. Sign up for a free uptime monitor (UptimeRobot) to detect any defacement or redirects caused by hacking. Review your hosting account's access logs quarterly for unusual patterns.

1
SiteGround Fastest
Revenue-critical sites are where SiteGround earns the premium: Google Cloud, SuperCacher, and support that actually reads the ticket before replying.
★★★★½
✓ المزايا
  • Staging, backups, and PHP version options on SiteGround match our screenshots.
  • High uptime, steady response times on their Google Cloud setup.
  • Staging and daily backups on every plan.
✕ العيوب
  • SiteGround menu labels change. Look for the idea, not one fixed menu path.
  • No free domain included.
السعر/شهر$3.99
التخزين10 GB SSD
نطاق مجاني✕ لا
وقت التشغيل99.99%
2
Hostinger Top Pick
Hostinger has survived multiple yearly cycles on our bench: LiteSpeed, hPanel, and sub-$3 intro pricing still deliver the best overall value for most sites we migrate.
★★★★½
✓ المزايا
  • Staging, backups, and PHP version options on Hostinger match our screenshots.
  • Fast LiteSpeed loading, consistent in our repeated tests.
  • Good storage, SSL, and backups on entry plans, no forced add-ons at login.
✕ العيوب
  • Hostinger menu labels change. Look for the idea, not one fixed menu path.
  • No phone support on any plan.
السعر/شهر$2.99
التخزين100 GB SSD
نطاق مجاني✓ نعم
وقت التشغيل99.9%

الأسئلة الشائعة

How do I know if my WordPress site has been hacked?+
Signs: Google Search Console shows security warnings, your site redirects to spam pages, visitors report malware warnings, Google Analytics shows unusual traffic spikes, or your host sends a malware notification. Run a Wordfence scan immediately and check your hosting file manager for recently modified files.
Is WordPress secure by default?+
WordPress core is secure and regularly patched. Most hacks exploit vulnerable plugins or themes, weak passwords, or outdated installations. not WordPress itself. Keeping everything updated and following this guide's steps makes WordPress very secure.
How much does WordPress security cost?+
The 10 steps in this guide are achievable with free tools (Wordfence free, Cloudflare free, UpdraftPlus free with Google Drive storage). Wordfence Premium ($119/year) adds real-time threat intelligence. Sucuri's website application firewall ($199.99/year) is the most comprehensive paid option.