How to Use PHP-FPM with cPanel

PHP-FPM (FastCGI Process Manager) is a high-performance PHP handler designed to handle heavy traffic websites efficiently. Unlike the traditional suPHP or CGI handlers, PHP-FPM offers better speed, lower memory usage, and improved control over PHP processes.

If your website runs on WordPress, Joomla, Laravel, or other PHP-based applications, enabling PHP-FPM in cPanel can greatly improve performance and stability.

Benefits of Using PHP-FPM

  • Faster Performance – Handles high loads with lower response time.

  • Reduced Resource Usage – Manages PHP processes efficiently.

  • Better Security – Isolates PHP processes per user or domain.

  • Fine-Tuned Control – Supports per-domain PHP configurations.

Enabling PHP-FPM in cPanel

Step 1: Log in to cPanel

  1. Go to your domain’s cPanel login page.

  2. Enter your username and password to access the dashboard.

Step 2: Navigate to “MultiPHP Manager”

  1. In the cPanel goto MultiPHP Manager.

  2. Open it – this tool lets you manage PHP versions and handlers per domain.

Step 3: Enable PHP-FPM for Your Domain

  1. Locate the domain you want to optimize.

  2. Under the PHP-FPM column, tick the checkbox.

  3. Click “Enable PHP-FPM”.

Your domain is now running PHP-FPM instead of the default PHP handler.

Step 3: Enable PHP-FPM for Your Domain

  1. Locate the domain you want to optimize.

  2. Under the PHP-FPM column, tick the checkbox.

  3. Click “Enable PHP-FPM”.

Your domain is now running PHP-FPM instead of the default PHP handler.

Adjusting PHP-FPM Settings

Step 1: Open “MultiPHP INI Editor”

  1. From cPanel, search for MultiPHP INI Editor.

  2. Select your domain.

Step 2: Configure PHP Settings

Here, you can adjust values such as:

  • memory_limit – Maximum memory a script can use.

  • upload_max_filesize – Maximum file size allowed for uploads.

  • post_max_size – Max size of POST data (important for forms).

  • max_execution_time – How long scripts can run before timeout.

Save changes to apply.

Step 3: Fine-Tuning PHP-FPM Pools (Advanced – WHM Users)

If you have root/WHM access, you can fine-tune PHP-FPM pool options:

  1. Log in to WHM.

  2. Go to MultiPHP Manager → System PHP-FPM Configuration.

  3. Adjust settings such as:

    • pm.max_children – Max PHP processes.

    • pm.max_requests – Number of requests per process.

    • pm.start_servers – Number of PHP-FPM workers started initially.

This helps optimize server performance for high-traffic websites.

Troubleshooting PHP-FPM Issues

  1. Website Not Loading After Enabling PHP-FPM

    • Disable PHP-FPM temporarily in MultiPHP Manager and test.

    • Ensure correct PHP version is set.

  2. 500 Internal Server Error

    • Check error logs:

    • Adjust PHP settings if limits are too low.

  1. High Resource Usage

    • Fine-tune pool settings (if you have WHM/root access).

    • Optimize your application (database queries, caching).

Best Practices for Using PHP-FPM

  • Always pair PHP-FPM with the latest stable PHP version.

  • Enable OPcache for better PHP performance.

  • Monitor Resource Usage in cPanel to ensure stable operation.

  • For high-traffic sites, fine-tune pm.max_children and related settings.

  • Restart PHP-FPM from WHM if you encounter stuck processes.

Using PHP-FPM with cPanel is one of the easiest ways to enhance website performance, reduce server load, and handle more concurrent users without issues. With just a few clicks in cPanel’s MultiPHP Manager, you can enable PHP-FPM for your domain and enjoy faster, more reliable hosting.

For advanced optimization, WHM users can fine-tune PHP-FPM pool settings to achieve the perfect balance between performance and resource usage.