If your server’s websites are running slowly or encountering memory-related errors like “Allowed memory size exhausted”, increasing the PHP memory limit via WHM (Web Host Manager) can significantly improve performance. Allocating more memory allows PHP scripts to execute more efficiently, reducing the chances of crashes or incomplete processes.

Why Increase the PHP Memory Limit?

The PHP memory limit defines how much memory a PHP script is allowed to use. When your site starts hitting this limit, it can lead to performance issues, white screens, or critical errors. By increasing the memory limit, you give your applications the resources they need to function smoothly, especially on websites with plugins, complex scripts, or large data operations.

Steps to Adjust the PHP Memory Limit in WHM

Follow these steps to safely raise the PHP memory limit in WHM:

  1. Login to WHM
    Use your admin credentials to log into your WHM dashboard.

  2. Navigate to MultiPHP INI Editor
    Under the Software section in the left-hand sidebar, click on “MultiPHP INI Editor.”

  3. Select PHP Version
    In the Basic Mode tab, choose the PHP version used by your website(s) that you want to modify.

  4. Locate and Modify memory_limit
    Scroll down to find the memory_limit setting.

    • The default value is typically 128M.

    • You can increase this to 256M, 512M, or higher based on your server capacity and application needs.

  5. Save the Changes
    Once you’ve set the desired value, click Save to apply the new configuration.

Final Thoughts

Raising the PHP memory limit in WHM is a quick and effective way to resolve memory-related errors and enhance website performance. Just be cautious not to set it excessively high unless your server resources can handle it.

At ServerAdminz, our server management experts are here to help you troubleshoot performance issues, optimize PHP configurations, and ensure your hosting environment runs at its best.

Reach out to our team or check out more helpful articles in our blog section.