How to Increase the PHP Memory Limit in cPanel- wordpress Tutorial (2023)

How to Increase the PHP Memory Limit in cPanel- wordpress Tutorial (2023)

Rate this post

In this tutorial, we will learn How to Increase the PHP Memory Limit in cPanel- wordpress Tutorial (2023)

To increase the PHP memory limit in cPanel for WordPress, follow these steps:

  1. Log in to your cPanel account and navigate to the Software section.
  2. Click on the Select PHP Version option.
  3. Click on the Switch To PHP Options button.
  4. Locate the memory_limit option and set the value to the desired memory limit (e.g. 256M).
  5. Click on the Save button to save your changes.
  6. Verify that your new memory limit has been applied by navigating to your WordPress site and checking the PHP memory limit using a plugin like WP Memory Usage or by checking your site’s System Information page.

Alternatively, you can also increase the PHP memory limit by adding a line of code to your site’s wp-config.php file. Here’s how:

  1. Log in to your cPanel account and navigate to the File Manager.
  2. Navigate to the root directory of your WordPress installation.
  3. Find and edit the wp-config.php file.
  4. Add the following line of code to the file, just before the line that says “That’s all, stop editing! Happy blogging.”

define(‘WP_MEMORY_LIMIT’, ‘256M’);

  1. Save your changes and exit the file.
  2. Verify that your new memory limit has been applied by navigating to your WordPress site and checking the PHP memory limit using a plugin like WP Memory Usage or by checking your site’s System Information page.

Increasing the PHP memory limit in cPanel can help improve the performance of your WordPress site and prevent memory-related errors.

PHP Selector

The PHP Selector is omitted by default in cPanel and might be missing from your account if you are hosting with a different web host. All ChemiCloud customers should see the Select PHP Version section in their hosting account’s cPanel.

Tutorial with images:

1) Log into cPanel.
2) Look for the SOFTWARE section and click on Select PHP version

Software > Select PHP Version

3) Click on the Options link in the new window.


4) Here, you can locate the memory_limit and click on the value.

A dropdown menu or text input box will appear, allowing you to change the value as required. Check your script, plugin, or theme’s documentation (or an on-screen error message) to find the correct value.

5) Once you’ll do the change, the new value will be automatically updated. If the change was successful, you will see a green box with a message confirming that the change has been applied.

That’s all! Now you know how to increase the PHP Memory Limit in cPanel.