Website speed is critical for user experience and SEO rankings. Slow sites lead to higher bounce rates and lower conversions. This guide covers advanced optimization techniques using cPanel tools, including caching, compression, PHP tuning, and resource monitoring.


Why Performance Optimisation Matters

  • SEO Impact: Google prioritizes fast-loading sites.
  • User Experience: Faster sites reduce abandonment.
  • Server Efficiency: Optimized sites consume fewer resources.

Step 1: Enable Gzip Compression

  1. Log in to cPanel.
  2. Navigate to Software → Optimise Website.
  3. Select Compress All Content.
  4. Click Update Settings.

Why?
Gzip reduces file sizes by up to 70%, improving load times.


Step 2: Configure Caching

  • If your server uses LiteSpeed, enable LiteSpeed Cache:
    • Install the LiteSpeed plugin for WordPress or Joomla.
  • For Apache servers:
    • Add caching rules in .htaccess:
       
       
       
      <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresByType image/jpg "access plus 1 year"
      ExpiresByType text/css "access plus 1 month"
      ExpiresByType application/javascript "access plus 1 month"
      </IfModule>

Tip: Use browser caching for static assets like images, CSS, and JS.


Step 3: Optimise PHP Settings

  1. Go to MultiPHP INI Editor.
  2. Adjust:
    • memory_limit → 256M or higher for heavy apps.
    • max_execution_time → 120 seconds for large imports.
    • upload_max_filesize → Increase if needed.
  3. Apply changes and restart PHP-FPM if available.

Step 4: Enable OPcache

  • OPcache improves PHP performance by storing precompiled scripts.
  • Enable via Select PHP Version → Extensions → OPcache.
  • Configure in MultiPHP INI Editor:
     
     
    opcache.enable=1
    opcache.memory_consumption=128
    opcache.max_accelerated_files=10000
     

Step 5: Monitor Resource Usage

  • Navigate to Metrics → Resource Usage.
  • Check:
    • CPU and memory spikes.
    • I/O usage.
  • Action: If limits are hit, consider upgrading hosting or optimising scripts.

Step 6: Optimise Databases

  • Use phpMyAdmin → Optimise Table for large tables.
  • Run:
     
     
    OPTIMIZE TABLE wp_posts;
     
  • Tip: Schedule regular optimisation via cron jobs.

Step 7: Implement CDN

  • Use Cloudflare or similar CDN for global content delivery.
  • Configure DNS in Zone Editor.
  • Enable HTTP/2 and Brotli compression for extra speed.

Advanced Performance Tips

  • Minify CSS/JS using plugins or manual tools.
  • Enable Hotlink Protection to prevent bandwidth theft.
  • Use Image Optimisation tools (e.g., WebP format).

Troubleshooting

  • Site Still Slow?
    • Check for heavy plugins or scripts.
    • Use GTmetrix or PageSpeed Insights for diagnostics.
  • Caching Conflicts?
    • Clear cache after updates.
    • Disable conflicting plugins.
Byla tato odpověď nápomocná? 34 Uživatelům pomohlo (125 Hlasů)