{"id":282,"date":"2025-04-04T08:17:47","date_gmt":"2025-04-04T08:17:47","guid":{"rendered":"https:\/\/yesdomain.io\/kb\/?p=282"},"modified":"2025-06-16T05:20:41","modified_gmt":"2025-06-16T05:20:41","slug":"increase-wordpress-memory-limit","status":"publish","type":"post","link":"https:\/\/yesdomain.io\/kb\/increase-wordpress-memory-limit\/","title":{"rendered":"How to Increase the WordPress Memory Limit?"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\">How to Increase WordPress Memory Limit on YesDomain Hosting<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">While managing a WordPress website, you might occasionally encounter an error message like:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>\u201cThere has been a critical error on this website.\u201d<\/strong><\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">One of the common causes of this issue is when the <strong>PHP memory limit<\/strong> allocated to the site gets exhausted. This means WordPress is trying to use more memory than what\u2019s currently available on the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this guide, we\u2019ll walk you through <strong>two easy methods<\/strong> to increase the memory limit for a WordPress site hosted on <strong>YesDomain Cloud Hosting<\/strong>. We recommend starting with <strong>Method 1<\/strong>. If that doesn\u2019t work for your setup, try <strong>Method 2<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Method 1: Update the wp-config.php File<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is the most direct way to boost your WordPress memory usage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step-by-step:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Login to your YesDomain Control Panel.<\/strong><\/li>\n\n\n\n<li>From the dashboard, open <strong>File Manager<\/strong>.<\/li>\n\n\n\n<li>Navigate to the directory where your website\u2019s files are located. Usually, this is:<br><code>public_html<\/code> (or the folder associated with your domain).<\/li>\n\n\n\n<li>Locate the file named <strong>wp-config.php<\/strong>.<br>Right-click on it and choose <strong>Edit<\/strong>.<\/li>\n\n\n\n<li>Scroll through the code and find this line: <code>\/* That's all, stop editing! Happy publishing. *\/<\/code><\/li>\n\n\n\n<li>Just <strong>above that line<\/strong>, paste the following code: <code>define('WP_MEMORY_LIMIT', '256M');<\/code><\/li>\n\n\n\n<li>Click <strong>Save<\/strong> to apply the changes.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This line tells WordPress to allocate <strong>256MB of memory<\/strong> \u2014 which is usually sufficient for most themes and plugins to work without memory issues.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Method 2: Update Memory Limit via PHP Settings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If editing the <code>wp-config.php<\/code> file doesn\u2019t resolve the issue, try increasing memory via PHP configuration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Steps:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Login to your YesDomain Control Panel.<\/strong><\/li>\n\n\n\n<li>Select the <strong>Domain Name<\/strong> for which you want to modify PHP memory limits.<\/li>\n\n\n\n<li>Click on <strong>Select PHP Version<\/strong> (or it may appear as <strong>PHP Settings<\/strong> depending on your panel version).<\/li>\n\n\n\n<li>Choose or confirm the PHP version your site is currently using.<\/li>\n\n\n\n<li>Open the <strong>Options<\/strong> tab, and locate the setting called:<br><code>memory_limit<\/code><\/li>\n\n\n\n<li>Set it to <code>256M<\/code> or a higher value if needed.<\/li>\n\n\n\n<li>Changes are automatically saved in most panels, but double-check for a <strong>Save or Apply button<\/strong> just in case.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udfe2 Final Words<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once these steps are completed, try reloading your website. If the issue was caused by insufficient memory, it should now be resolved.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you continue facing the error or need expert help, don\u2019t hesitate to reach out to our <strong>YesDomain Support Team<\/strong> via ticket or WhatsApp.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Quick Notes:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For WooCommerce or heavy themes, setting memory to <strong>256M or 512M<\/strong> is ideal.<\/li>\n\n\n\n<li>Always <strong>take a backup<\/strong> before editing core WordPress files.<\/li>\n\n\n\n<li>For multisite installations, use <code>WP_MAX_MEMORY_LIMIT<\/code>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>How to Increase WordPress Memory Limit on YesDomain Hosting While managing a WordPress website, you might occasionally encounter an error message like: \u201cThere has been a critical error on this website.\u201d One of the common causes of this issue is when the PHP memory limit allocated to the site gets exhausted. This means WordPress is &#8230; <a title=\"How to Increase the WordPress Memory Limit?\" class=\"read-more\" href=\"https:\/\/yesdomain.io\/kb\/increase-wordpress-memory-limit\/\" aria-label=\"Read more about How to Increase the WordPress Memory Limit?\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,36,44,45],"tags":[],"class_list":["post-282","post","type-post","status-publish","format-standard","hentry","category-technical-how-to-guides","category-directadmin-tutorials","category-website-speed-optimization","category-wordpress-errors-fixes"],"_links":{"self":[{"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/comments?post=282"}],"version-history":[{"count":1,"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/posts\/282\/revisions"}],"predecessor-version":[{"id":283,"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/posts\/282\/revisions\/283"}],"wp:attachment":[{"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/media?parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/categories?post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yesdomain.io\/kb\/wp-json\/wp\/v2\/tags?post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}