How to Increase PHP Memory Limit in WordPress

First you need to edit the wp-config.php file on your WordPress site. It is located in your WordPress site’s root folder, and you will need to use an FTP client or file manager in your web hosting control panel.

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.

Once you are done, you need to save your changes and upload your wp-config.php file back to your server.

You can now visit your WordPress site and memory exhausted error should disappear now.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Bots hitting xmlrpc.php and causing a high load

Due to a security issue in earlier versions of WordPress that allowed posting from xmlrpc.php,...

High CPU Usage on wordpress websites

Due to a security issue in earlier versions of WordPress that allowed posting from xmlrpc.php,...

How to block Brute Force attacks in wordpress wp-login.php

WordPress Admin login bruteforce protection, limit by referer You can protect your WordPress...

How to disable Error Reporting in Wordpress

You need to edit your: wp-config.php file and modify the following here:...

How to post in WordPress using classic editor ?

Posts are entries that display in reverse order on your home page and/or blog page. Posts usually...