Web Hosting Knowledge Base / Hosting and Websites

Server resources usage optimization

This article focuses on server resources usage optimization. It targets websites that run on PHP and MySQL, such as WordPress and Moodle. We’ll use WordPress as an example throughout. The goal is to help you reduce CPU and memory, so your site loads faster and stays within plan limits. This article does not cover other performance aspects like media files optimization.

Easy steps with great impact

  1. Use a modern PHP version
  • Why: PHP 8.x is significantly faster and more efficient than PHP 7.x. It executes code quicker and uses fewer server resources.
  • How in cPanel: Go to cPanel > Software > Select PHP Version, choose PHP 8.x, and apply. Be sure that OPcache is enabled. —it reduces CPU usage by caching compiled PHP code.
  • Notes: Ensure your theme and plugins are compatible with PHP 8 before switching. Test your site after the change.

2. Keep WordPress core up to date

  • Why: Each release brings performance and security improvements. Running the latest version generally reduces resource usage and improves stability.
  • How: In wp-admin > Dashboard > Updates, update WordPress core, then update themes and plugins. Consider enabling minor auto-updates.

3. Move to LiteSpeed-based servers

  • Why: LiteSpeed’s event-driven architecture and LSAPI for PHP handle concurrent traffic more efficiently than Apache’s process-based model. It typically reduces CPU and memory usage while improving response times, especially under load.
  • Best pairing: On LiteSpeed, use the free LSCache plugin for WordPress. It integrates with the server for superior page, object (redis), and browser caching.
  • How: Choose a LiteSpeed-based plan or request upgrade to a LiteSpeed server via helpdesk, then install and configure LiteSpeed Cache (LSCache) in WordPress.

Optimize your WordPress plugins

General rule: fewer plugins = faster, leaner site. Every active plugin loads code on requests and often performs database queries or background tasks. 

Audit regularly:

  • Deactivate and delete plugins you don’t use.
  • Avoid duplicates (multiple plugins doing the same job).
  • Prefer well-maintained, lightweight plugins with recent updates.

Drop plugins that are unnecessary on 2MHost servers:

  • Security suites such as WordFence: 2MHost runs Imunify360 at the server level (firewall, WAF, malware scanning). Security plugins add little value and can consume significant CPU/disk I/O.
  • SSL/HTTPS helper plugins: 2MHost automatically installs and renews SSL certificates. You don’t need plugins that claim to install, renew, or “monitor” SSL.

Use exactly one caching/performance plugin:

  • What caching does: Caching stores pre-generated page output and other data so PHP and MySQL don’t have to run on every visit. This sharply reduces CPU and database load.
  • One only: Running multiple caching or “performance booster” plugins cause conflicts, duplicative work, and often higher resource usage.
  • Recommended:
    • On LiteSpeed servers: use LiteSpeed Cache for WordPress Plugin (LSCache) and disable any other caching plugins.
    • On non-LiteSpeed servers: choose one reputable caching plugin and stick to it. Do not enable overlapping features across multiple plugins.
  • After enabling caching: Warm the cache by visiting key pages and ensure scheduled cache purges are not overly aggressive.

General tip: After each change, check load times, resource graphs in admin area and cPanel, and the site’s behavior under normal traffic (while you are logged out of WordPress Dashboard). Keep what measurably helps and remove the rest.


Last update: Oct 02, 2025 19:21