When hosting WordPress or any PHP-based CMS (such as Joomla, Drupal, or Magento) on a cPanel server, the performance and stability of your web hosting environment are influenced by two key components:
- The Apache MPM (Multi-Processing Module)
- The PHP handler used (CGI, PHP-FPM, or LSAPI)
This guide explains which Apache worker is best depending on your PHP handler.
What Is an Apache MPM?
Apache MPMs define how Apache handles incoming web requests. The main types are:
- mod_mpm_prefork — No threads; uses more memory, compatible with older PHP handlers.
- mod_mpm_worker — Threaded; better performance, but not compatible with all handlers.
- mod_mpm_event — Asynchronous/threaded; fastest and most efficient.
Which Apache MPM Should You Use?
If using PHP-FPM (recommended by cPanel):
- Best MPM:
event - Why:
eventis non-blocking and highly efficient. Since PHP-FPM handles PHP requests outside Apache, Apache can focus on static files and connection management.
If using CGI or suPHP (older setups):
- Required MPM:
prefork - Why: These handlers are not thread-safe and require the prefork MPM, which is slower and uses more memory. Only recommended for compatibility reasons.
If using LSAPI (LiteSpeed SAPI) via CloudLinux or alt-php:
- Best MPM:
event - Why: LSAPI also runs PHP outside Apache, similar to PHP-FPM. You get the best performance by combining it with
event, while user isolation is handled by CageFS (not itk).
Avoid Using:
- mod_mpm_itk unless you have no CageFS or are trying to run PHP as specific system users. It introduces high memory and CPU overhead.
- prefork unless you’re running a legacy setup with CGI/suPHP and can’t upgrade.
How to Check Your Current Apache MPM
Run this command via SSH:
apachectl -V | grep -i mpm
Summary Table
| PHP Handler | Recommended MPM | Notes |
|---|---|---|
| PHP-FPM | event |
Fastest modern setup |
| CGI/suPHP | prefork |
Legacy/compatibility only |
| LSAPI | event |
Best performance with CloudLinux |
Conclusion
For modern WordPress or PHP CMS hosting, we strongly recommend using PHP-FPM or LSAPI in combination with the event MPM. This ensures the best performance, scalability, and resource efficiency.
If you’re unsure which handler your cPanel account is using, or you’d like to optimise your server setup, feel free to contact SIRSTEVEHQ support.