Boost Website Speed with PHP Optimization

Optimizing PHP settings is crucial for improving website performance, security, and stability. cPanel offers two powerful tools for PHP configuration: MultiPHP Manager and CloudLinux PHP Selector. Understanding when and how to use each can help you fine-tune your hosting environment for optimal results.

Understanding MultiPHP Manager vs. CloudLinux PHP Selector

Feature MultiPHP Manager CloudLinux PHP Selector
PHP Version Control Allows selecting PHP versions per domain. Offers a wider range of PHP versions with advanced control.
Customization Limited to basic PHP settings. Enables deep customization of PHP modules and settings.
Best For Standard PHP version management. Advanced users needing granular PHP control.

How to Optimize PHP Performance Using MultiPHP Manager

Step 1: Access MultiPHP Manager

  1. Log in to cPanel.
  2. Navigate to the Software section.
  3. Click on MultiPHP Manager.

Step 2: Change PHP Version

  1. Find the domain you want to update.
  2. Select a PHP version from the drop-down list.
  3. Click Apply to update.

Step 3: Adjust PHP Settings with MultiPHP INI Editor

  1. Go back to the Software section.
  2. Click on MultiPHP INI Editor.
  3. Select the domain you want to modify.
  4. Adjust the following settings for performance:
    • memory_limit – Increase to prevent memory errors.
    • max_execution_time – Set higher for complex scripts.
    • post_max_size & upload_max_filesize – Adjust for file uploads.
    • enable_opcache – Turn on for faster script execution.
  5. Click Apply to save changes.

How to Optimize PHP with CloudLinux PHP Selector

Step 1: Access CloudLinux PHP Selector

  1. Log into cPanel.
  2. Go to the Software section.
  3. Click Select PHP Version (CloudLinux PHP Selector).

Step 2: Change PHP Version

  1. Choose your preferred PHP version from the list.
  2. Click Set as Current.

Step 3: Enable/Disable PHP Extensions

  1. Under the Extensions tab, check the necessary PHP modules (e.g., ionCube, mysqli, opcache).
  2. Click Save.

Step 4: Customize PHP Settings

CloudLinux PHP Selector allows deeper customization:

  1. Click on Options.
  2. Modify the following settings:
    • memory_limit – Adjust based on your application’s needs.
    • upload_max_filesize – Set limits for file uploads.
    • max_input_vars – Increase for large data processing.
    • opcache.enable – Ensure it is turned on.
  3. Click Save to apply changes.

Best Practices for PHP Performance Optimization

  • Use the latest PHP version: It offers better speed and security.
  • Enable OPcache: Significantly reduces PHP execution time.
  • Optimize database queries: Reduce load times for dynamic sites.
  • Monitor resource usage: Use UnderHost’s Realtime Monitoring for performance tracking.
  • Upgrade hosting if needed: Consider Cloud VPS or Dedicated Servers for high-traffic sites.

Need Expert Assistance?

Optimizing PHP settings can significantly boost website speed and stability. If you need expert guidance, explore UnderHost’s Managed Hosting. Our team is available at @CustomerPanel for 24/7 support.