If your websites hosted on Leo Servers are loading slowly or showing errors like “Allowed memory size of X bytes exhausted”, it's a sign that your PHP scripts are hitting the default memory cap. Don’t worry — increasing the PHP memory limit using WHM (Web Host Manager) can instantly improve site performance and stability.
This is especially important for websites running WordPress, Magento, or other content-heavy CMSs with large plugins or themes. Whether you’re managing client sites or optimizing your own, this tweak ensures smoother operations across your hosting environment.
💡 Why Increase the PHP Memory Limit?
The PHP memory limit controls the maximum amount of RAM a PHP script can use on your server. Hitting this ceiling can result in:
-
500 Internal Server Errors
-
White screen of death
-
Plugin or theme malfunctions
-
Incomplete cron jobs or data imports
By increasing the limit, you:
-
Allow larger or more complex scripts to run successfully
-
Improve compatibility with modern CMS and plugin requirements
-
Prevent website crashes during peak traffic or high-load processes
For users on Leo Servers' optimized hosting environments, we recommend adjusting this limit based on your specific workload — especially if you're running dynamic applications or high-traffic sites.
⚙️ How to Safely Increase PHP Memory Limit in WHM (Step-by-Step)
Follow these steps to boost your PHP memory allocation:
1. Log in to WHM 🔐
Access your WHM using root/admin credentials provided by Leo Servers.
URL: https://your-server-ip:2087
Tip: If you're using Leo Servers' Managed Dedicated Hosting, your WHM login link may be available in your client dashboard.
2. Go to the MultiPHP INI Editor 🧩
In the WHM dashboard, scroll or search for “MultiPHP INI Editor” under the Software section.
3. Select the Right PHP Version 🧪
-
Click on the Basic Mode tab.
-
Choose the PHP version your websites are using (e.g., PHP 7.4, PHP 8.1).
Not sure which PHP version you’re using? Check in cPanel > Select PHP Version for your domain.
4. Find and Edit memory_limit
📈
Scroll down until you see the memory_limit
field.
-
Default value: 128M
-
Recommended upgrades:
-
256M for small business websites
-
512M for large CMS-based sites
-
1024M or higher for custom applications or high-traffic portals
-
Change the value accordingly based on your Leo Servers hosting plan and click “Apply”.
5. Save and Confirm ✅
Click the Save button to apply the new settings. It takes effect immediately, no reboot required.
🛠️ Additional Tips from Leo Servers Experts
-
Don’t over-allocate — Increasing memory too high without having adequate physical RAM can cause server-wide performance issues. If unsure, contact Leo Servers support.
-
Monitor usage — Use WHM’s “Top Processes” or install tools like
htop
orNew Relic
to monitor actual PHP usage over time. -
Use performance profiles — Leo Servers provides pre-optimized configurations for WordPress, Laravel, Magento, and more. Just ask support!
🧑💻 Need Help? Leo Servers Has You Covered
At Leo Servers, we offer fully managed server solutions with 24/7 expert support. If you’re facing PHP-related issues or performance bottlenecks, our team can fine-tune your environment, monitor for issues, and ensure your sites stay blazing fast.