{"id":13672,"date":"2024-11-13T09:48:41","date_gmt":"2024-11-13T09:48:41","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=13672"},"modified":"2026-02-26T14:02:09","modified_gmt":"2026-02-26T14:02:09","slug":"how-to-resolve-memory-limit-issues-in-wordpress-and-php","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/","title":{"rendered":"How to Fix Memory Limit Issues in WordPress &#038; PHP"},"content":{"rendered":"<p>In this guide, you will explore how to resolve memory limit issues in WordPress and PHP.<\/p>\n<p>WordPress is a versatile content management system, that allows you to quickly build a professional website or blog. However, the default memory limit, typically set to 32MB, may fall short as your site grows in plugins or traffic. When your WordPress site surpasses this limit, you may encounter an error such as:<\/p>\n<p><strong>Fatal error: Allowed memory size of 33554432 bytes exhausted<\/strong><\/p>\n<p>In response, many users either reach out to their hosting provider or try to adjust their \u201c.htaccess\u201d file, which can lead to accidental problems if not handled carefully. Always remember to back up your WordPress files before making any changes.<\/p>\n<h5><strong>Steps to Increase the WordPress Memory Limit:<\/strong><\/h5>\n<ol>\n<li><strong>Modify the wp-config.php File: <\/strong>To increase the WordPress memory limit, locate the \u201cwp-config.php\u201d file in your WordPress directory, accessible via SSH or the File Manager in cPanel. Add this line to boost the memory:<br \/>\n<span style=\"color: #993366;\">define(&#8216;WP_MEMORY_LIMIT&#8217;, &#8217;64M&#8217;);<\/span> Adjust this limit to 32MB, 40MB, 64MB, or 128MB, depending on your requirements.<\/li>\n<li><strong>Contact Your Hosting Provider (<a href=\"https:\/\/www.bodhost.com\/web-hosting\/linux-shared-hosting\" target=\"_blank\" rel=\"noopener\">Shared Web Hosting<\/a>) <\/strong>For shared hosting plans, you might want to ask your hosting provider to increase the memory limit on your behalf.<\/li>\n<li><strong>Increase PHP Memory Limit\u00a0 <\/strong>Since WordPress operates on PHP, increasing PHP\u2019s memory limit is essential. Locate the php.ini file (typically in the \/etc\/ directory on cPanel servers) and adjust the memory_limit parameter: <span style=\"color: #993366;\">memory_limit = 64M<\/span> If you run multiple WordPress sites, ensure the memory allocation is sufficient for all installations. For instance, if two blogs each require 64MB, set the PHP memory limit to 128MB: <span style=\"color: #993366;\">memory_limit = 128M<\/span><\/li>\n<\/ol>\n<ol start=\"4\">\n<li><strong>Refresh Your Site <\/strong>After completing these adjustments, refresh your WordPress site to see if the memory issue has been resolved.<\/li>\n<\/ol>\n<p>Implementing the above-outlined steps should help resolve memory errors, allowing your WordPress site to run smoothly as it expands. Moreover, if you face any difficulty with this process, get in touch with our technical team.<\/p>\n<p>Read also <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-fix-the-critical-error-on-your-website-in-wordpress\/\" target=\"_blank\" rel=\"noopener\">How to Fix the \u2018Critical Error on Your Website\u2019 in WordPress<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, you will explore how to resolve memory limit issues in WordPress and PHP. WordPress is a versatile content management system, that allows you to quickly build a&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[858],"tags":[1580],"class_list":["post-13672","post","type-post","status-publish","format-standard","hentry","category-wodpress","tag-resolve-memory-limit-issues-in-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Resolve Memory Limit Issues in WordPress and PHP<\/title>\n<meta name=\"description\" content=\"This article explains how to resolve memory limit issues in WordPress and PHP when the limit is exceeded..\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Resolve Memory Limit Issues in WordPress and PHP\" \/>\n<meta property=\"og:description\" content=\"This article explains how to resolve memory limit issues in WordPress and PHP when the limit is exceeded..\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-13T09:48:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:09+00:00\" \/>\n<meta name=\"author\" content=\"Serena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serena\" \/>\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:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\\\/\"},\"author\":{\"name\":\"Serena\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\"},\"headline\":\"How to Fix Memory Limit Issues in WordPress &#038; PHP\",\"datePublished\":\"2024-11-13T09:48:41+00:00\",\"dateModified\":\"2026-02-26T14:02:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\\\/\"},\"wordCount\":352,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"Resolve Memory Limit Issues in WordPress\"],\"articleSection\":[\"WodPress\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\\\/\",\"name\":\"How to Resolve Memory Limit Issues in WordPress and PHP\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2024-11-13T09:48:41+00:00\",\"dateModified\":\"2026-02-26T14:02:09+00:00\",\"description\":\"This article explains how to resolve memory limit issues in WordPress and PHP when the limit is exceeded..\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"WodPress\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/wodpress\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Fix Memory Limit Issues in WordPress &#038; PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\",\"name\":\"Serena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"caption\":\"Serena\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/seema\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Resolve Memory Limit Issues in WordPress and PHP","description":"This article explains how to resolve memory limit issues in WordPress and PHP when the limit is exceeded..","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:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/","og_locale":"en_US","og_type":"article","og_title":"How to Resolve Memory Limit Issues in WordPress and PHP","og_description":"This article explains how to resolve memory limit issues in WordPress and PHP when the limit is exceeded..","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2024-11-13T09:48:41+00:00","article_modified_time":"2026-02-26T14:02:09+00:00","author":"Serena","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Serena","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/"},"author":{"name":"Serena","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830"},"headline":"How to Fix Memory Limit Issues in WordPress &#038; PHP","datePublished":"2024-11-13T09:48:41+00:00","dateModified":"2026-02-26T14:02:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/"},"wordCount":352,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["Resolve Memory Limit Issues in WordPress"],"articleSection":["WodPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/","name":"How to Resolve Memory Limit Issues in WordPress and PHP","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2024-11-13T09:48:41+00:00","dateModified":"2026-02-26T14:02:09+00:00","description":"This article explains how to resolve memory limit issues in WordPress and PHP when the limit is exceeded..","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-resolve-memory-limit-issues-in-wordpress-and-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"WodPress","item":"https:\/\/www.bodhost.com\/kb\/category\/wodpress\/"},{"@type":"ListItem","position":2,"name":"How to Fix Memory Limit Issues in WordPress &#038; PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830","name":"Serena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","caption":"Serena"},"url":"https:\/\/www.bodhost.com\/kb\/author\/seema\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=13672"}],"version-history":[{"count":3,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13672\/revisions"}],"predecessor-version":[{"id":13677,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13672\/revisions\/13677"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=13672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=13672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=13672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}