How to increase memory limi? wp-config way does not work

Hello friends. I installed the wordpress with EasyEngine. Everything went fine. When I tried to initiate theme I got the message that memory was set at 40mb and was too low. I tried to insert define( 'WP_MAX_MEMORY_LIMIT', '256M' ); but it did not solve the issue.

Is there another setting I can change to bump it up to 256M ? Where is php.ini located? Is it on “per site” or global for all the sites?

Also , when I click on “visit site” from within wordpress admin I get redirected to http://(myurl.com)/defaultsite
Wondering if it’s something related to cache or wordpress or is there something i am not doing right?

P.S. I am fairly familiar with wordpress and do not know any settings that would cause that.

Thank you

Hi I had the same problem. After for too much time. I found it!

Next, you need to paste this code in wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’ 1 define( ‘WP_MEMORY_LIMIT’, ‘256M’ ); This code tells WordPress to increase the PHP memory limit to 256MB.

So for easy engine (EE) your wp-config.php will be in folder “/var/www/yourwebsite.com$” sudo vim wp-config.php "

Just make sure to add the line before ‘That’s all, stop editing! Happy blogging.’ and it should work find :wink:

here the ref: http://www.wpbeginner.com/wp-tutorials/fix-wordpress-memory-exhausted-error-increase-php-memory/

This is the most annoying problem in the WordPress if you do not know what to do exactly. For all those who still did not find the way to solve this problem, here is a simple way.

In order to increase WP memory limit, you need to edit wp-config.php file which is located in the root directory of your WordPress installation. If WordPress is installed on your main domain (like www. example.com) then wp-config.php file will be located in the public_html folder of File Manager in your hosting control panel (cPanel). You can access and edit this file through cPanel or using an FTP Client (like FileZilla). Now search for the below line in your wp-config.php file:

/* That’s all, stop editing! Happy blogging. */

Now, copy and paste the below line of code just after that line, as shown in the screenshot.

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

This code will now increase your WordPress PHP memory limit to 256MB. After saving the wp-config.php file you can now visit your website to see if the error has been resolved or not. In most cases this simple method should resolve the issue.

Source: https://www.webxen.com/kb/wordpress-fatal-error-allowed-memory-size-of-67108864-bytes-exhausted/

1 Like