{"id":3381,"date":"2024-05-09T13:24:56","date_gmt":"2024-05-09T13:24:56","guid":{"rendered":"https:\/\/platinumsupport.in\/blog\/?p=3381"},"modified":"2025-10-15T17:26:14","modified_gmt":"2025-10-15T17:26:14","slug":"increase-php-memory-limit-wordpress","status":"publish","type":"post","link":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/","title":{"rendered":"How to Increase PHP Memory Limit via wp-config.php"},"content":{"rendered":"\n<h2 class=\"wp-block-heading has-medium-font-size\" id=\"h-how-to-increase-php-memory-limit-for-your-wordpress-website-via-wp-config-php\">How to Increase PHP Memory Limit for Your WordPress Website via wp-config.php<\/h2>\n\n\n\n<p>Have you ever encountered the dreaded &#8220;<strong>fatal error: allowed memory size exhausted<\/strong>&#8221; message on your WordPress website? It&#8217;s a common issue, especially for sites with a lot of plugins or complex themes. Fortunately, there&#8217;s a straightforward solution: increasing the PHP memory limit.<\/p>\n\n\n\n<p>In this guide, we&#8217;ll walk you through the steps to increase the PHP memory limit for your WordPress website using the wp-config.php file. This method is simple and effective, ensuring your site has enough memory to function smoothly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\" id=\"h-why-increase-php-memory-limit\">Why Increase PHP Memory Limit?<\/h2>\n\n\n\n<p>PHP memory limit defines the maximum amount of memory that a script can consume during execution. WordPress, being a dynamic content management system, relies heavily on PHP to generate web pages. If your website exceeds the default memory limit, you may encounter various issues such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Slow performance<\/li>\n\n\n\n<li>Crashes or downtime<\/li>\n\n\n\n<li>Inability to update plugins or themes<\/li>\n\n\n\n<li>White screen of death<\/li>\n<\/ul>\n\n\n\n<p><br>Increasing the PHP memory limit can prevent these problems and ensure your website operates optimally.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\" id=\"h-step-by-step-guide\">Step-by-Step Guide:<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li style=\"margin-top:var(--wp--preset--spacing--30);margin-right:0;margin-bottom:var(--wp--preset--spacing--30);margin-left:0\"><strong>Access Your WordPress Files:<\/strong><br>You&#8217;ll need access to your WordPress site&#8217;s files, typically through an FTP client or file manager provided by your web hosting provider.<\/li>\n\n\n\n<li style=\"margin-top:var(--wp--preset--spacing--30);margin-right:0;margin-bottom:var(--wp--preset--spacing--30);margin-left:0\"><strong>Locate wp-config.php File:<br><\/strong>Navigate to the root directory of your WordPress installation and find the wp-config.php file. This file contains essential configuration settings for your WordPress site.<\/li>\n\n\n\n<li style=\"margin-top:var(--wp--preset--spacing--30);margin-right:0;margin-bottom:var(--wp--preset--spacing--30);margin-left:0\"><strong>Edit wp-config.php File:<br><\/strong>Open the wp-config.php file using a text editor such as Notepad or Visual Studio Code.<\/li>\n\n\n\n<li style=\"margin-top:var(--wp--preset--spacing--30);margin-right:0;margin-bottom:var(--wp--preset--spacing--30);margin-left:0\"><strong>Add Memory Limit Code:<br><\/strong>Insert the following code snippet just before the line that says &#8220;\/* That&#8217;s all, stop editing! Happy blogging. *\/&#8221;:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>define('WP_MEMORY_LIMIT', '256M');<\/code><\/pre>\n\n\n\n<p>You can adjust the memory limit value (256M in this example) according to your requirements. Common values include 128M, 256M, 512M, or higher depending on your site&#8217;s needs and server resources.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li style=\"margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30)\"><strong>Save Changes:<br><\/strong>Save the wp-config.php file after adding the code snippet.<\/li>\n\n\n\n<li style=\"margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30)\"><strong>Verify Changes:<br><\/strong>To confirm that the PHP memory limit has been successfully increased, log in to your WordPress admin dashboard and go to &#8220;Tools&#8221; > &#8220;Site Health.&#8221; Under the &#8220;Info&#8221; tab, you should see the PHP memory limit reflecting the new value you set.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\" id=\"h-conclusion\">Conclusion:<\/h2>\n\n\n\n<p class=\"has-text-align-left\">By increasing the PHP memory limit for your WordPress website via the wp-config.php file, you can mitigate memory-related issues and ensure your site operates smoothly. Remember to monitor your site&#8217;s performance regularly and adjust the memory limit as needed to accommodate growth and changes.<\/p>\n\n\n\n<p class=\"has-text-align-left\">Ensuring an adequate memory limit is just one aspect of maintaining a healthy WordPress site. Regular updates, security measures, and optimization techniques are also essential for a seamless user experience. If you encounter persistent issues or need further assistance, don&#8217;t hesitate to reach out to PlatinumSupport team.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>For Technical Assistance,<\/strong>&nbsp;Contact&nbsp;<a href=\"https:\/\/platinumsupport.in\/submitticket.php\">PlatinumSupport<\/a>:<\/p>\n\n\n\n<p><strong>WhatsApp<\/strong>: +91 9922950127<br><strong>Email<\/strong>: esupport@platinumsupport.in<\/p>\n\n\n\n<p><a href=\"https:\/\/platinumsupport.in\/\">PlatinumSupport&nbsp;<\/a>is here to provide expert guidance and technical support.<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>How to Increase PHP Memory Limit for Your WordPress Website via wp-config.php Have you ever encountered the dreaded &#8220;fatal error: allowed memory size exhausted&#8221; message on your WordPress website? It&#8217;s a common issue, especially for sites with a lot of plugins or complex themes. Fortunately, there&#8217;s a straightforward solution: increasing the PHP memory limit. In [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3381","post","type-post","status-publish","format-standard","hentry","category-cpanel-whm-technical-support-solutions"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.13 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Increase PHP Memory Limit in WordPress (Easy Fix)<\/title>\n<meta name=\"description\" content=\"Learn how to increase the PHP memory limit in WordPress using wp-config.php, and fix \u201cAllowed memory size exhausted\u201d errors easily\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Increase PHP Memory Limit via wp-config.php\" \/>\n<meta property=\"og:description\" content=\"Learn how to increase the PHP memory limit in WordPress using wp-config.php, and fix \u201cAllowed memory size exhausted\u201d errors easily\" \/>\n<meta property=\"og:url\" content=\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/platinumsupport.in\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-09T13:24:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-15T17:26:14+00:00\" \/>\n<meta name=\"author\" content=\"Anand\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anand\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/\"},\"author\":{\"name\":\"Anand\",\"@id\":\"https:\/\/platinumsupport.in\/blog\/#\/schema\/person\/aa475c6a968475a732f330a12ff18ede\"},\"headline\":\"How to Increase PHP Memory Limit via wp-config.php\",\"datePublished\":\"2024-05-09T13:24:56+00:00\",\"dateModified\":\"2025-10-15T17:26:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/\"},\"wordCount\":493,\"publisher\":{\"@id\":\"https:\/\/platinumsupport.in\/blog\/#organization\"},\"articleSection\":[\"cPanel\/WHM\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/\",\"url\":\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/\",\"name\":\"How to Increase PHP Memory Limit in WordPress (Easy Fix)\",\"isPartOf\":{\"@id\":\"https:\/\/platinumsupport.in\/blog\/#website\"},\"datePublished\":\"2024-05-09T13:24:56+00:00\",\"dateModified\":\"2025-10-15T17:26:14+00:00\",\"description\":\"Learn how to increase the PHP memory limit in WordPress using wp-config.php, and fix \u201cAllowed memory size exhausted\u201d errors easily\",\"breadcrumb\":{\"@id\":\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/platinumsupport.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Increase PHP Memory Limit via wp-config.php\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/platinumsupport.in\/blog\/#website\",\"url\":\"https:\/\/platinumsupport.in\/blog\/\",\"name\":\"PlatinumSupport.in\",\"description\":\"Discover Success through Expert Guidance: Dive into the PlatinumSupport Blog for Solutions and Empowerment!\",\"publisher\":{\"@id\":\"https:\/\/platinumsupport.in\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/platinumsupport.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/platinumsupport.in\/blog\/#organization\",\"name\":\"Tech Savy Systems\",\"url\":\"https:\/\/platinumsupport.in\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/platinumsupport.in\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/platinumsupport.in\/blog\/wp-content\/uploads\/2024\/02\/psm-blog.png\",\"contentUrl\":\"https:\/\/platinumsupport.in\/blog\/wp-content\/uploads\/2024\/02\/psm-blog.png\",\"width\":250,\"height\":75,\"caption\":\"Tech Savy Systems\"},\"image\":{\"@id\":\"https:\/\/platinumsupport.in\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/platinumsupport.in\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/platinumsupport.in\/blog\/#\/schema\/person\/aa475c6a968475a732f330a12ff18ede\",\"name\":\"Anand\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/platinumsupport.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/610c86cd51134253c03e1441f07cd9c4e75bdbf5a06560ddc04e568bd85a89e5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/610c86cd51134253c03e1441f07cd9c4e75bdbf5a06560ddc04e568bd85a89e5?s=96&d=mm&r=g\",\"caption\":\"Anand\"},\"description\":\"I have been working in the web hosting support industry for over 15 years as a level 3 administrator, and I am proud to hold RED HAT certification. My expertise lies in providing support for Dedicated Servers, Cloud Servers, and VPS running various Linux operating systems such as CentOS, AlmaLinux, CloudLinux, and Ubuntu. Additionally, I am proficient in working with popular control panels like CPanel, Plesk, CWP, AApanel etc.\",\"sameAs\":[\"https:\/\/platinumsupport.in\/blog\"],\"honorificPrefix\":\"Mr\",\"honorificSuffix\":\"Er\",\"birthDate\":\"1980-11-11\",\"gender\":\"male\",\"knowsAbout\":[\"WebHosting Technical Support\"],\"knowsLanguage\":[\"English\",\"Hindi\",\"Marathi\"],\"jobTitle\":\"Level3 System Administrator\",\"worksFor\":\"PlatinumSupport.ni\",\"url\":\"https:\/\/platinumsupport.in\/blog\/author\/anand-v\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Increase PHP Memory Limit in WordPress (Easy Fix)","description":"Learn how to increase the PHP memory limit in WordPress using wp-config.php, and fix \u201cAllowed memory size exhausted\u201d errors easily","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to Increase PHP Memory Limit via wp-config.php","og_description":"Learn how to increase the PHP memory limit in WordPress using wp-config.php, and fix \u201cAllowed memory size exhausted\u201d errors easily","og_url":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/","og_site_name":"Knowledge Base","article_publisher":"https:\/\/facebook.com\/platinumsupport.in","article_published_time":"2024-05-09T13:24:56+00:00","article_modified_time":"2025-10-15T17:26:14+00:00","author":"Anand","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Anand","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/#article","isPartOf":{"@id":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/"},"author":{"name":"Anand","@id":"https:\/\/platinumsupport.in\/blog\/#\/schema\/person\/aa475c6a968475a732f330a12ff18ede"},"headline":"How to Increase PHP Memory Limit via wp-config.php","datePublished":"2024-05-09T13:24:56+00:00","dateModified":"2025-10-15T17:26:14+00:00","mainEntityOfPage":{"@id":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/"},"wordCount":493,"publisher":{"@id":"https:\/\/platinumsupport.in\/blog\/#organization"},"articleSection":["cPanel\/WHM"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/","url":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/","name":"How to Increase PHP Memory Limit in WordPress (Easy Fix)","isPartOf":{"@id":"https:\/\/platinumsupport.in\/blog\/#website"},"datePublished":"2024-05-09T13:24:56+00:00","dateModified":"2025-10-15T17:26:14+00:00","description":"Learn how to increase the PHP memory limit in WordPress using wp-config.php, and fix \u201cAllowed memory size exhausted\u201d errors easily","breadcrumb":{"@id":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/platinumsupport.in\/blog\/increase-php-memory-limit-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/platinumsupport.in\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Increase PHP Memory Limit via wp-config.php"}]},{"@type":"WebSite","@id":"https:\/\/platinumsupport.in\/blog\/#website","url":"https:\/\/platinumsupport.in\/blog\/","name":"PlatinumSupport.in","description":"Discover Success through Expert Guidance: Dive into the PlatinumSupport Blog for Solutions and Empowerment!","publisher":{"@id":"https:\/\/platinumsupport.in\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/platinumsupport.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/platinumsupport.in\/blog\/#organization","name":"Tech Savy Systems","url":"https:\/\/platinumsupport.in\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/platinumsupport.in\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/platinumsupport.in\/blog\/wp-content\/uploads\/2024\/02\/psm-blog.png","contentUrl":"https:\/\/platinumsupport.in\/blog\/wp-content\/uploads\/2024\/02\/psm-blog.png","width":250,"height":75,"caption":"Tech Savy Systems"},"image":{"@id":"https:\/\/platinumsupport.in\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/platinumsupport.in"]},{"@type":"Person","@id":"https:\/\/platinumsupport.in\/blog\/#\/schema\/person\/aa475c6a968475a732f330a12ff18ede","name":"Anand","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/platinumsupport.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/610c86cd51134253c03e1441f07cd9c4e75bdbf5a06560ddc04e568bd85a89e5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/610c86cd51134253c03e1441f07cd9c4e75bdbf5a06560ddc04e568bd85a89e5?s=96&d=mm&r=g","caption":"Anand"},"description":"I have been working in the web hosting support industry for over 15 years as a level 3 administrator, and I am proud to hold RED HAT certification. My expertise lies in providing support for Dedicated Servers, Cloud Servers, and VPS running various Linux operating systems such as CentOS, AlmaLinux, CloudLinux, and Ubuntu. Additionally, I am proficient in working with popular control panels like CPanel, Plesk, CWP, AApanel etc.","sameAs":["https:\/\/platinumsupport.in\/blog"],"honorificPrefix":"Mr","honorificSuffix":"Er","birthDate":"1980-11-11","gender":"male","knowsAbout":["WebHosting Technical Support"],"knowsLanguage":["English","Hindi","Marathi"],"jobTitle":"Level3 System Administrator","worksFor":"PlatinumSupport.ni","url":"https:\/\/platinumsupport.in\/blog\/author\/anand-v\/"}]}},"_links":{"self":[{"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/posts\/3381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/comments?post=3381"}],"version-history":[{"count":1,"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/posts\/3381\/revisions"}],"predecessor-version":[{"id":3383,"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/posts\/3381\/revisions\/3383"}],"wp:attachment":[{"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/media?parent=3381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/categories?post=3381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/platinumsupport.in\/blog\/wp-json\/wp\/v2\/tags?post=3381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}