WordPress performance directly impacts SEO, user experience, and conversion rates. On shared hosting, resource limits can cause slow load times if not optimized. This guide covers advanced techniques for improving WordPress speed using cPanel tools, PHP settings, caching, and database optimization.


Step 1: Choose the Right PHP Version

  1. Log in to cPanel.
  2. Navigate to Software → MultiPHP Manager.
  3. Select PHP 8.1 or higher for better performance and security.
  4. Apply changes to your domain.

Tip: PHP 8+ offers significant speed improvements over older versions.


Step 2: Optimize PHP Settings

Use MultiPHP INI Editor:

  • memory_limit = 256M (or higher for large sites)
  • max_execution_time = 120
  • upload_max_filesize = 64M

Step 3: Enable Gzip Compression

  1. Go to Software → Optimise Website.
  2. Select Compress All Content.
  3. Click Update Settings.

Why? Gzip reduces file size, improving load times.


Step 4: Implement Caching

  • LiteSpeed Cache (if available):
    • Enable via cPanel → LiteSpeed Web Cache Manager.
  • WordPress Plugins:
    • Recommended: WP Rocket, W3 Total Cache, or LiteSpeed Cache.

Step 5: Optimise Database

  • Use phpMyAdmin in cPanel:
    • Select your WordPress database.
    • Click Check All → Optimise Table.
  • Install WP-Optimize plugin for automated cleanup.

Step 6: Use a CDN

  • Integrate Cloudflare via cPanel:
    • Navigate to Cloudflare icon.
    • Enable CDN for global content delivery.

Step 7: Image Optimization

  • Compress images using lossless compression tools:
    • Plugins: Smush, ShortPixel.
  • Convert images to WebP format for faster loading.

Step 8: Monitor Resource Usage

  • Go to Metrics → Resource Usage in cPanel.
  • Identify CPU or memory spikes.
  • Optimize plugins or consider upgrading hosting if limits are hit.

Advanced Tips

  • Disable unused plugins and themes.
  • Enable Object Cache if supported by your host.
  • Use HTTP/2 or HTTP/3 (enabled by SSL).

Troubleshooting

  • Slow Backend: Increase PHP memory limit and disable heavy plugins.
  • High CPU Usage: Check for bots or enable rate limiting via .htaccess:
     
     
     
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteRule .* - [F,L]
    </IfModule>

     
  • Database Errors: Repair tables in phpMyAdmin.

Security Best Practices

  • Keep WordPress, themes, and plugins updated.
  • Enable Two-Factor Authentication for admin accounts.
  • Use Wordfence or Sucuri for firewall protection.
Cette réponse était-elle pertinente? 26 Utilisateurs l'ont trouvée utile (99 Votes)