Encountering the dreaded “Allowed memory size of X bytes exhausted” error can instantly halt your productivity and frustrate your website visitors. When you see this warning on your WordPress site, it usually means your PHP memory limit has been reached. WordPress requires a certain amount of memory to run scripts, load plugins, and process database queries. When you install heavy themes, feature-rich plugins, or run complex page builders, the default PHP memory limit allocated by your hosting provider might not be enough.
Fortunately, fixing this issue does not require advanced programming skills. If your web hosting account includes the industry-standard cPanel control panel, you can resolve this resource bottleneck in just a few minutes. This comprehensive guide walks you through the exact steps required to increase WordPress PHP memory limit using cPanel easily, ensuring your website runs smoothly, loads faster, and avoids fatal errors.
Understanding the WordPress PHP Memory Limit
Before diving into the technical steps, you need to understand what PHP memory is and why your WordPress site occasionally runs out of it. PHP is the core scripting language that powers WordPress. Every time a user visits your website, your server executes PHP scripts to fetch content from your database, apply styling from your theme, and render the final HTML page sent to the browser.
What is PHP Memory Limit and Why Do You Need More
The PHP memory limit is the maximum amount of RAM (Random Access Memory) your server allows a single script to consume. By default, many web hosting providers set this limit conservatively low—often to 32MB, 64MB, or 128MB—to ensure that all accounts on a shared server share resources fairly and no single site hogs server capacity.
However, modern WordPress installations demand more resources. Core software, page builders like Elementor or Divi, WooCommerce stores, and security plugins all require headroom. When a script hits the allocated ceiling, the server halts execution immediately, resulting in the white screen of death or an explicit memory exhaustion error message. Increasing your limit gives your site the breathing room it needs to execute intensive tasks without crashing.
How to Check Your Current PHP Memory Limit
Before making any changes, you should verify your current memory limit to confirm whether an increase is actually necessary. You can check this directly from your WordPress dashboard without needing to log into cPanel yet.
Navigate to your WordPress administration area, go to Tools, and click on Site Health. Under the Info tab, look for the Server dropdown section. Here, you will find the line labeled “PHP memory limit.” If this value is lower than 256MB, or if you are experiencing frequent errors, it is time to use cPanel to scale it up.
If you’re looking to enhance your WordPress site’s performance by increasing the PHP memory limit using cPanel, you might also find it beneficial to understand the importance of securing your website with SSL certificates. For a comprehensive overview, check out this related article on understanding SSL certificates: EV vs. DV and which one you need. This resource will help you make informed decisions about securing your site while optimizing its performance.
Preparing Your cPanel Environment

Accessing your hosting control panel is the first major milestone in solving your resource issues. cPanel is a graphical interface designed to simplify the management of web hosting servers. While it might look intimidating with its dozens of icons, you only need to interact with a specific few to adjust your PHP settings.
Logging into cPanel Successfully
To begin, open your web browser and navigate to your cPanel login URL. This is typically your domain name followed by a colon and the port number 2083 (for example, https://yourdomain.com:2083). Alternatively, most hosting providers allow you to log into cPanel directly from your customer client area or billing portal with a single click.
Enter your cPanel username and password, then click the Log In button. Once inside the main dashboard, take a moment to familiarize yourself with the layout. You can use the search bar at the top of the page to quickly filter tools, which saves you from scrolling through dozens of software and domain management modules.
Locating the Right PHP Management Tools
Depending on your hosting provider, server configuration, and the version of cPanel you are using, the tool responsible for managing PHP settings might go by a few different names. You will want to look for one of the following options in your cPanel dashboard:
- Select PHP Version
- MultiPHP INI Editor
- MultiPHP Manager
Each of these tools serves a slightly different function, but they all give you the ability to alter server-level directives. If one tool does not immediately expose the memory limit setting, do not panic. The subsequent sections will guide you through the most reliable methods using these exact cPanel utilities.
Using the MultiPHP INI Editor Tool

The MultiPHP INI Editor is arguably the most user-friendly tool in cPanel for modifying PHP settings like the memory limit. It provides a straightforward interface where you can adjust directives globally for a specific domain or switch to a basic mode that lets you edit variables via form fields.
Accessing Basic Mode and Selecting Your Domain
Type “MultiPHP INI Editor” into the cPanel search bar and click on the corresponding icon to open the tool. At the top of the page, you will usually be presented with two distinct tabs or views: Editor Mode and Basic Mode. Always start with Basic Mode unless you are an advanced administrator.
Once in Basic Mode, you will see a dropdown menu or a list prompting you to select a home directory or a specific domain name. Choose the exact domain where your WordPress site is installed. Selecting the correct domain is crucial, especially if you host multiple websites on a single cPanel account, as you want to ensure the memory increase applies only to the troubled site.
Modifying the Memory Limit Directive
After selecting your domain, the page will refresh to display a list of common PHP directives that you can configure. Scroll down the list until you find the directive named memory_limit.
You will notice an input field next to this directive showing your current limit, such as 128M or 256M. Click inside this input field and change the value to a higher allocation. Recommended values for modern WordPress sites range from 256M to 512M.
Once you have typed in your desired value, look for the Save button, which is typically located at the bottom or top of the configuration form. Click it to apply the changes. A success notification will appear on the screen, confirming that the new PHP memory limit has been saved to your server configuration.
Using the Select PHP Version Tool
If your cPanel interface does not feature the MultiPHP INI Editor or if making changes there does not seem to affect your live WordPress site, your host likely manages PHP through the CloudLinux PHP Selector interface. This tool manages multiple PHP versions on the same server and includes a dedicated options tab for advanced configurations.
Navigating to PHP Extensions and Options
Find the tool named “Select PHP Version” in your cPanel dashboard and click on it. This utility will show you the currently active PHP version for your website and allow you to switch between different versions (such as PHP 8.1, 8.2, or 8.3).
At the top menu bar of the Select PHP Version screen, you will see two main tabs: Extensions and Options. Click on the Options tab. This section displays a collection of PHP directives and limits that govern how scripts execute under your chosen PHP version.
Adjusting the Memory Limit Value
Scroll through the list of options on the page until you locate memory_limit. It is often arranged alphabetically or grouped with execution time settings.
Click on the dropdown menu currently displaying your memory limit value. Select a higher tier from the available options, such as 256M or 512M. In many modern implementations of this tool, changes are saved automatically the moment you select a new value from the dropdown menu, though some interfaces require you to click a save icon at the bottom of the section. Keep an eye out for a small notification confirming that your settings have been updated successfully.
If you’re looking to optimize your WordPress site further, you might find it helpful to explore strategies for enhancing your domain’s value as well. A related article discusses the resale value of PK domains and offers insights into investment trends and predictions for 2025. You can read more about it here. Understanding these trends can provide a comprehensive approach to managing your online presence effectively.
Verifying Your Changes and Troubleshooting
| Step | Action | Description | Typical Values | Notes |
|---|---|---|---|---|
| 1 | Login to cPanel | Access your hosting control panel using your credentials | N/A | Usually via https://yourdomain.com/cpanel or hosting provider link |
| 2 | Open Select PHP Version or MultiPHP INI Editor | Navigate to the PHP configuration section in cPanel | N/A | Depends on hosting provider’s cPanel setup |
| 3 | Locate memory_limit setting | Find the PHP directive named memory_limit | Default: 128M or 256M | May vary based on hosting defaults |
| 4 | Increase memory_limit value | Set memory_limit to a higher value to increase PHP memory | Recommended: 256M, 512M, or 1024M | Do not exceed hosting provider limits |
| 5 | Save changes | Apply the new PHP configuration settings | N/A | Changes take effect immediately or after a short delay |
| 6 | Verify changes | Check WordPress Site Health or phpinfo() to confirm new memory limit | Should reflect updated memory_limit value | Use WordPress Site Health tool or create a phpinfo.php file |
After using cPanel to increase your PHP memory limit, you must verify that the modification took effect on your live WordPress site. Never assume a setting has applied without checking, as server caching layers or conflicting configuration files can sometimes override cPanel adjustments.
Confirming the Fix in WordPress
Return to your WordPress administration dashboard, navigate to Tools, and click on Site Health once more. Check the Server tab and look at the “PHP memory limit” line.
If the value now reflects the higher number you set in cPanel (for example, 256M or 512M), congratulations! The fix was successful, and your site now has the resources it needs. Refresh the page where you previously encountered the memory exhaustion error to confirm that the warning has disappeared and your features are working correctly.
Addressing Persistence Issues and Overrides
What happens if you checked your Site Health page and the memory limit has not changed? This scenario usually points to a hardcoded override inside your WordPress installation or server configuration files.
Check your root directory using the cPanel File Manager to see if your wp-config.php file contains a manually defined memory limit. If you find a line reading define('WP_MEMORY_LIMIT', '128M');, WordPress will enforce that limit regardless of what cPanel says. You can manually edit that line in wp-config.php to match your new higher value, such as define('WP_MEMORY_LIMIT', '512M');.
Additionally, check for a .htaccess file in your root folder. Sometimes, legacy rules or hosting configurations require the memory limit to be declared directly in .htaccess using a PHP value directive. If issues persist, reach out to your hosting provider’s support team. They can quickly check server-level constraints and ensure that your cPanel modifications are allowed to take effect globally across your account.
FAQs
What is the PHP memory limit in WordPress?
The PHP memory limit in WordPress refers to the maximum amount of memory that a PHP script is allowed to consume while running. This limit is crucial for ensuring that your website can handle various tasks, such as running plugins and themes, without crashing or slowing down.
Why would I need to increase the PHP memory limit?
You may need to increase the PHP memory limit if you encounter errors such as “Allowed memory size exhausted” or if your website is running slowly due to resource-intensive plugins or themes. Increasing the limit can help improve performance and prevent crashes.
How can I check my current PHP memory limit in cPanel?
You can check your current PHP memory limit in cPanel by navigating to the “Select PHP Version” or “PHP Selector” option. From there, you can view the current settings, including the memory limit, and make adjustments if necessary.
What steps do I need to follow to increase the PHP memory limit using cPanel?
To increase the PHP memory limit using cPanel, log in to your cPanel account, go to the “Select PHP Version” or “PHP Selector,” click on “Options,” and then locate the “memory_limit” setting. You can then increase the value to your desired limit and save the changes.
Are there any risks associated with increasing the PHP memory limit?
While increasing the PHP memory limit can improve performance, setting it too high may lead to server resource exhaustion, especially on shared hosting environments. It’s essential to find a balance and monitor your website’s performance after making changes.


Add comment