Help Center / Wordpress

How to Increase Wordpress Memory Limit

Updated: November 27, 2023


There are various reasons why you might want to increase the PHP memory limit of your WordPress website, and there are different methods to accomplish this. The most common reason is when your website is using more memory than it's allocated memory limit. These errors include the 500 internal server error and the Wordpress white screen. You might just simply need to increase your PHP memory limit to a number that is much better suited for your developing Wordpress site.

The default memory limit for WordPress is 32 MB.

This guide will show you how to increase the Wordpress memory limit.




Step 1

25% Complete (success)
Cpanel Login Screen

Log into your cPanel Account.





Step 2

50% Complete (success)
File Manager

Scroll down to * Files * section and click on the * File Manager * icon.





Step 3

75% Complete (success)
Wordpress memory limit

Navigate to the root folder of your domain. Select wp-config.php file and click Edit.






Step 4

100% Complete (success)
Memory limit example

Add the following code right before the /* That's all, stop editing! Happy blogging. */' line.


define( 'WP_MEMORY_LIMIT', '512M' );


Click Save when finished.




Note: It is also possible to change WP_MEMORY_LIMIT by going to wp-includes folder of the installation and editing default-constants.php file.