{"id":3945,"date":"2026-07-07T15:40:00","date_gmt":"2026-07-07T14:40:00","guid":{"rendered":"https:\/\/www.4uhosting.co.uk\/articles\/knowledgebase\/increase-the-wordpress-memory-limit\/"},"modified":"2026-08-19T14:00:27","modified_gmt":"2026-08-19T13:00:27","slug":"increase-the-wordpress-memory-limit","status":"publish","type":"kb_article","link":"https:\/\/www.4uhosting.co.uk\/articles\/knowledgebase\/increase-the-wordpress-memory-limit\/","title":{"rendered":"Increase the WordPress Memory Limit"},"content":{"rendered":"<p>Some WordPress plugins, themes or admin tasks may need more memory than WordPress is currently allowed to use.<\/p>\n<p>This can happen with larger WooCommerce sites, page builders, imports, backups or plugin updates.<\/p>\n<p>You can ask WordPress to use more memory by editing the <code>wp-config.php<\/code> file. This only works if the PHP memory limit on the hosting account is high enough to allow it.<\/p>\n<p>Take a backup before editing <code>wp-config.php<\/code>.<\/p>\n<ol>\n<li>Log in to cPanel.<\/li>\n<li>Open <strong>File Manager<\/strong>.<\/li>\n<li>Open the folder where WordPress is installed.<\/li>\n<li>Find the <code>wp-config.php<\/code> file.<\/li>\n<li>Right-click the file and choose <strong>Edit<\/strong>.<\/li>\n<li>Find the line that says:<\/li>\n<\/ol>\n<p><code>\/<em> That's all, stop editing! Happy publishing. <\/em>\/<\/code><\/p>\n<ol>\n<li>Add the following lines above it:<\/li>\n<\/ol>\n<pre><code>define( 'WP_MEMORY_LIMIT', '256M' );\ndefine( 'WP_MAX_MEMORY_LIMIT', '256M' );<\/code><\/pre>\n<ol>\n<li>Save the file.<\/li>\n<li>Reload the site or WordPress dashboard and check whether the error has cleared.<\/li>\n<\/ol>\n<p><code>WP_MEMORY_LIMIT<\/code> applies to normal WordPress requests. <code>WP_MAX_MEMORY_LIMIT<\/code> applies to WordPress admin tasks.<\/p>\n<p>If the hosting account&#8217;s PHP memory limit is lower than the value you set in <code>wp-config.php<\/code>, WordPress will not be able to use the higher value.<\/p>\n<p>Increasing the memory limit can help when WordPress genuinely needs more memory, but it does not fix every problem. If the error keeps coming back, a plugin, theme or script may be using too much memory and should be checked properly.<\/p>\n<p>If you are unsure what memory limit is available on your hosting plan, open a support ticket and we can check it for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some WordPress plugins, themes or admin tasks may need more memory than WordPress is currently allowed to use. This can happen with larger WooCommerce&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"template":"","kb_category":[37],"class_list":["post-3945","kb_article","type-kb_article","status-publish","hentry","kb_category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.4uhosting.co.uk\/articles\/wp-json\/wp\/v2\/kb_article\/3945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.4uhosting.co.uk\/articles\/wp-json\/wp\/v2\/kb_article"}],"about":[{"href":"https:\/\/www.4uhosting.co.uk\/articles\/wp-json\/wp\/v2\/types\/kb_article"}],"author":[{"embeddable":true,"href":"https:\/\/www.4uhosting.co.uk\/articles\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/www.4uhosting.co.uk\/articles\/wp-json\/wp\/v2\/kb_article\/3945\/revisions"}],"predecessor-version":[{"id":4042,"href":"https:\/\/www.4uhosting.co.uk\/articles\/wp-json\/wp\/v2\/kb_article\/3945\/revisions\/4042"}],"wp:attachment":[{"href":"https:\/\/www.4uhosting.co.uk\/articles\/wp-json\/wp\/v2\/media?parent=3945"}],"wp:term":[{"taxonomy":"kb_category","embeddable":true,"href":"https:\/\/www.4uhosting.co.uk\/articles\/wp-json\/wp\/v2\/kb_category?post=3945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}