{"id":7952,"date":"2026-08-20T23:00:12","date_gmt":"2026-08-20T22:00:12","guid":{"rendered":"https:\/\/harmonweb.com\/blog\/?p=7952"},"modified":"2026-08-20T23:00:12","modified_gmt":"2026-08-20T22:00:12","slug":"how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site","status":"publish","type":"post","link":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/","title":{"rendered":"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site"},"content":{"rendered":"<p>In case WordPress is showing \u201c<span style=\"color: #0000ff\">Allowed memory size exhausted<\/span>\u201d error, then this means that the limit of PHP memory of your website has been exceeded. Although increasing PHP memory will fix the issue, it is important to find out the cause of memory exhaustion first.\u201d<\/p>\n<p>Boosting the <a href=\"https:\/\/harmonweb.com\/blog\/how-to-view-your-php-version-in-cpanel\/\" target=\"_blank\" rel=\"noopener\">PHP memory limit in WordPress<\/a> will help you fix issues like updating errors, plugin errors, <a href=\"https:\/\/harmonweb.com\/blog\/fix-wordpress-white-screen-of-death\/\" target=\"_blank\" rel=\"noopener\">White Screen of Death<\/a>, and some types of <a href=\"https:\/\/harmonweb.com\/blog\/how-to-fix-500-internal-server-error-in-wordpress-2023\/\" target=\"_blank\" rel=\"noopener\">500 Internal Server Errors<\/a>.<\/p>\n<p>In this article, we will discuss what exactly is the PHP memory limit, the amount of memory required by WordPress, and ways to increase it safely.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a8780824e77c\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a8780824e77c\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#What_is_the_PHP_Memory_Limit_of_WordPress\" >What is the PHP Memory Limit of WordPress?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#What_is_consuming_the_memory\" >What is consuming the memory?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#How_much_PHP_memory_does_WordPress_require\" >How much PHP memory does WordPress require?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#Find_Out_What_Your_Current_PHP_Memory_Limit_Is_First\" >Find Out What Your Current PHP Memory Limit Is First<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#How_to_increase_WordPress_PHP_Memory_Limit\" >How to increase WordPress PHP Memory Limit<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#1_Increasing_the_WordPress_Memory_Limit_using_wp-configphp\" >1. Increasing the WordPress Memory Limit using wp-config.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#2_Increasing_PHP_Memory_Limit_Using_cPanel\" >2. Increasing PHP Memory Limit Using cPanel<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#3_Modifying_phpini_When_Necessary\" >3. Modifying php.ini When Necessary<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#_4_Be_Wary_of_htaccess_Configuration\" >\u00a04. Be Wary of .htaccess Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#5_What_If_You_Are_Unable_to_Boost_the_PHP_Memory_Limit\" >5. What If You Are Unable to Boost the PHP Memory Limit?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#6_Do_Not_Confuse_Your_PHP_Memory_with_WordPress_Speed\" >6. Do Not Confuse Your PHP Memory with WordPress Speed<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#When_Is_It_Time_to_Raise_Your_PHP_Memory_Limit\" >When Is It Time to Raise Your PHP Memory Limit?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_is_the_PHP_Memory_Limit_of_WordPress\"><\/span>What is the PHP Memory Limit of WordPress?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The PHP memory limit refers to the amount of server memory available for a PHP script during the processing of the request.<\/p>\n<p>Being developed on PHP, every page view, each time you install a plugin, upload images or do any other administrative action on your WordPress website involves PHP.<\/p>\n<p>In case your WordPress website hits its PHP memory limit, you may encounter problems and uncompleted processes.<\/p>\n<p>For instance, you could be shown the following:<\/p>\n<table style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 100%\">Fatal error: Allowed memory size exhausted<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Low PHP memory can also lead to problems like the <a href=\"https:\/\/harmonweb.com\/blog\/fix-wordpress-white-screen-of-death\/\" target=\"_blank\" rel=\"noopener\">WordPress White Screen of Death<\/a> or some <a href=\"https:\/\/harmonweb.com\/blog\/how-to-fix-500-internal-server-error-in-wordpress-2023\/\" target=\"_blank\" rel=\"noopener\">500 Internal Server Errors<\/a>.<\/p>\n<p>It is important to note that PHP memory is just one component of the hosting resources you have. Even if you increase it, that alone will not solve the problems arising from the others.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_is_consuming_the_memory\"><\/span>What is consuming the memory?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul style=\"list-style-type: square\">\n<li>Newly added plugins<\/li>\n<li>Inefficient plugins<\/li>\n<li>Themes that use resources heavily<\/li>\n<li>WooCommerce<\/li>\n<li>Big data imports\/exports<\/li>\n<li>Image manipulation<\/li>\n<li>WordPress updates<\/li>\n<li>Heavy database queries<\/li>\n<li>Background processes<\/li>\n<li>Malware or malicious plugins<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"How_much_PHP_memory_does_WordPress_require\"><\/span>How much PHP memory does WordPress require?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>No one particular memory limit will be ideal for all websites created on WordPress. A basic blog that uses an easy to use theme and several plugins can do fine with a rather low limit setting<\/p>\n<p>However, a website such as a WooCommerce store, members&#8217; site, or a site using many plugins will need more. WordPress varies in its memory requirements based on the site, plugins, theme and workload. And in that regard, 256MB is a good benchmark to begin with when diagnosing such problems.<\/p>\n<p>The most crucial aspect is not to raise the limit needlessly all the time. If you are sure that your website is constantly eating too much memory, find out why and try to fix the problem.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Find_Out_What_Your_Current_PHP_Memory_Limit_Is_First\"><\/span>Find Out What Your Current PHP Memory Limit Is First<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before making any changes, see what your site is currently running with. This depends on your WordPress version, but you can view memory details below:<\/p>\n<p>Tools &gt; Site Health &gt; Info &gt; Server.<\/p>\n<p>You can check your PHP memory through your host\u2019s control panel as well. If you are using cPanel and have no experience with it, it will help if you read this article on <a href=\"https:\/\/harmonweb.com\/blog\/what-is-cpanel-and-how-do-you-use-it-effectively\/\" target=\"_blank\" rel=\"noopener\">what is cPanel and how to use it<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_increase_WordPress_PHP_Memory_Limit\"><\/span>How to increase WordPress PHP Memory Limit<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1_Increasing_the_WordPress_Memory_Limit_using_wp-configphp\"><\/span>1. Increasing the WordPress Memory Limit using wp-config.php<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>One of the most common techniques is by making changes to the <span style=\"color: #0000ff\">wp-config.php<\/span> file. Make sure you have saved the copy of the file before making changes.\u00a0It is usually accessible via File Manager from the cPanel or an FTP program.<\/p>\n<p>Locate the following code in <span style=\"color: #0000ff\">wp-config.php<\/span>:<\/p>\n<table style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 100%\">\/* That&#8217;s all, stop editing! Happy publishing. *\/<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Add the following line above it:<\/p>\n<table style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 100%\">define(&#8216;WP_MEMORY_LIMIT&#8217;, &#8216;256M&#8217;);<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You may also specify the memory limit for WordPress administration as:<\/p>\n<table style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 100%\">define(&#8216;WP_MAX_MEMORY_LIMIT&#8217;, &#8216;256M&#8217;);<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Save the changes and recheck your site.<\/p>\n<p><strong>Note<\/strong>: This does not necessarily override the PHP memory_limit set on the server. If the PHP memory limit on the server is lower than what you have specified, then it cannot take that value.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_Increasing_PHP_Memory_Limit_Using_cPanel\"><\/span>2. Increasing PHP Memory Limit Using cPanel<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Another way to increase PHP memory limit, if you use cPanel and your hosting company permits changing PHP options for clients, is a more elegant solution.<br \/>\nSimply log into cPanel and find MultiPHP INI Editor, Select PHP Version or some other PHP settings editor utility.<\/p>\n<p>Search for:<\/p>\n<table style=\"height: 24px;width: 40%;border-collapse: collapse\">\n<tbody>\n<tr style=\"height: 24px\">\n<td style=\"width: 100%;height: 24px\">memory_limit<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Then increase its size to something reasonable like:<\/p>\n<table style=\"width: 20%;border-collapse: collapse\">\n<tbody>\n<tr>\n<td style=\"width: 100%\">256M<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Then try the website again.<\/p>\n<p>With <a href=\"http:\/\/www.harmonweb.com\" target=\"_blank\" rel=\"noopener\">HarmonWeb<\/a>, you will be able to use <a href=\"https:\/\/harmonweb.com\/blog\/how-to-login-to-my-cpanel-account-from-my-harmonweb-client-area\/\" target=\"_blank\" rel=\"noopener\">cPanel via your HarmonWeb Client Area<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"3_Modifying_phpini_When_Necessary\"><\/span>3. Modifying php.ini When Necessary<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Another choice would be configuring through a <span style=\"color: #0000ff\">php.ini<\/span> file.<\/p>\n<p>Depending on your hosting system, it might be possible for you to modify\/create a <span style=\"color: #0000ff\">php.ini<\/span> file and set:<\/p>\n<table style=\"height: 24px;width: 70%;border-collapse: collapse\">\n<tbody>\n<tr style=\"height: 24px\">\n<td style=\"width: 100%;height: 24px\">memory_limit = 256M<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The above process relies upon the <a href=\"https:\/\/harmonweb.com\/blog\/how-to-switch-php-versions-in-your-hosting-control-panel\/\" target=\"_blank\" rel=\"noopener\">configuration of PHP in the web server<\/a> environment. Some hosting services limit the ability of accounts to modify their PHP settings.<\/p>\n<p>Setting up your PHP memory limit can be conveniently done via the PHP Selector feature on CloudLinux, accessible from your <a href=\"https:\/\/client.harmonweb.com\/knowledgebase\/4972\/How-to-Increase-or-Decrease-PHP-Memory-Limit-via-CloudLinux-Selector-in-cPanel.html\" target=\"_blank\" rel=\"noopener\">HarmonWeb Client Area or cPanel<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"_4_Be_Wary_of_htaccess_Configuration\"><\/span>\u00a04. Be Wary of .htaccess Configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>While some server environments may support the modification of PHP options via the <span style=\"color: #0000ff\">.htaccess<\/span> file, this is not always the case.<\/p>\n<p>In certain setups, when a specific PHP handler is being used, PHP setting such as this one:<\/p>\n<table style=\"width: 80%;border-collapse: collapse\">\n<tbody>\n<tr>\n<td style=\"width: 100%\">php_value memory_limit 256M<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>will be valid, whereas on another setup it will cause an error.<\/p>\n<p><strong>Thus<\/strong>, you should not be adding PHP directives to \u2018<span style=\"color: #0000ff\">.htaccess\u2019<\/span>\u00a0blindly.<\/p>\n<p>In case your website starts showing a 500 error, then you should undo that modification instantly.<\/p>\n<p>For further assistance, refer to HarmonWeb&#8217;s tips for solving 500 Internal Server Error in WordPress <a href=\"https:\/\/harmonweb.com\/blog\/how-to-fix-500-internal-server-error-in-wordpress-2023\/\" target=\"_blank\" rel=\"noopener\">500 Internal Server Error in WordPress<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"5_What_If_You_Are_Unable_to_Boost_the_PHP_Memory_Limit\"><\/span>5. What If You Are Unable to Boost the PHP Memory Limit?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>This is when your hosting environment plays an important role. Your hosting provider may set limits to the amount of memory, CPU, processes, database connections, and other resources you have for your account.<\/p>\n<p>Under such conditions, editing <span style=\"color: #0000ff\">wp-config.php<\/span> won\u2019t help you get additional physical resources from the server.The HarmonWeb hosts its <a href=\"https:\/\/harmonweb.com\/blog\/shared-servers-resources\/\" target=\"_blank\" rel=\"noopener\">guide about shared server resources<\/a> here.<\/p>\n<p>In case your site has been exhausting the resources frequently, then you might have to do the following:<\/p>\n<ul style=\"list-style-type: square\">\n<li>Deleting any unnecessary plugins<\/li>\n<li>Using good quality plugins that don\u2019t exhaust resources<\/li>\n<li>Database optimization<\/li>\n<li>Elimination of any unnecessary background tasks<\/li>\n<li>Optimization of images and other media files<\/li>\n<li>Caching<\/li>\n<li>Hosting upgrade<\/li>\n<\/ul>\n<p>We further suggests that you should investigate the reason behind memory exhaustion before increasing memory limit. Finding out the reason behind memory exhaustion will help prevent bugs in the hidden code from taking up all the memory on the server.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"6_Do_Not_Confuse_Your_PHP_Memory_with_WordPress_Speed\"><\/span>6. Do Not Confuse Your PHP Memory with WordPress Speed<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Allocating more memory to PHP will enable your website to perform more complex tasks, but it doesn\u2019t necessarily increase <a href=\"https:\/\/harmonweb.com\/blog\/how-to-optimize-your-web-hosting-for-faster-loading-times-an-harmonweb-guide\/\" target=\"_blank\" rel=\"noopener\">increase speed in WordPress.<\/a><\/p>\n<p>If your site is slow, you need to look into other aspects like server speed, caching, database queries, images, plug-ins, themes, and even your web host.<\/p>\n<p>For instance, the HarmonWeb\u2019s article on <a href=\"https:\/\/harmonweb.com\/blog\/how-to-speed-up-a-slow-wordpress-website\/\" target=\"_blank\" rel=\"noopener\">how to make a slow WordPress site faster<\/a> can assist you with identifying various performance issues.<\/p>\n<p>You will also discover more about <a href=\"https:\/\/harmonweb.com\/blog\/how-to-reduce-server-response-time-ttfb-and-improve-core-web-vitals\/\" target=\"_blank\" rel=\"noopener\">server response time and Core Web Vitals<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"When_Is_It_Time_to_Raise_Your_PHP_Memory_Limit\"><\/span>When Is It Time to Raise Your PHP Memory Limit?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you always experience errors because of not enough PHP memory, especially after adding an expensive plugin, theme, or feature, then raise your PHP memory limit.<\/p>\n<p>Nevertheless, you should not raise the limit just because you can. When a fairly straightforward site is using more memory than normal, the underlying cause needs to be identified. The problem could be a broken plugin, inefficient code in a theme, a flawed query in the database, or an incorrectly set up application.<\/p>\n<p>One of the reasons for the <a href=\"https:\/\/harmonweb.com\/blog\/why-wordpress-auto-updates-fail-and-how-to-resolve-them\/\" target=\"_blank\" rel=\"noopener\">failure of WordPress auto updates<\/a> includes not enough server resources.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>Question<\/strong>: How much should the PHP memory limit be set for WordPress?<\/p>\n<p><strong>Answer<\/strong>: There isn\u2019t any set value, but you can consider setting it to 256 MB initially. It may vary based on the size of your website, and accordingly the requirement might increase or decrease.<\/p>\n<p><strong>Question<\/strong>: Will increasing PHP memory cause problems with WordPress?<\/p>\n<p><strong>Answer<\/strong>: Increasing the limit in itself usually doesn\u2019t cause problems to WordPress, as long as the limit set is valid in your hosting environment. Improperly changing <span style=\"color: #0000ff\">wp-config.php<\/span>, <span style=\"color: #0000ff\">.htaccess<\/span>, or PHP configurations may, however, lead to errors.<\/p>\n<p><strong>Question<\/strong>: Why does WordPress still display the memory error despite increasing the limit?<\/p>\n<p><strong>Answer<\/strong>: There could be a situation where the PHP limit in the server is lower than the one set. There might also be a case where some other resource gets exhausted.<\/p>\n<p><strong>Question<\/strong>: Should I increase PHP memory rather than switching my hosting plan?<\/p>\n<p><strong>Answer<\/strong>: Not strictly. In case you notice that your site is constantly hitting the limit of your hosting account resources, it would be more beneficial to switch to another more suitable environment.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Increasing the PHP memory limit for WordPress can be an easy fix to problems related to memory, but you have to be careful while doing so. You need to first find out your existing limit and what is taking up the memory and then implement it.<\/p>\n<p>Changing <span style=\"color: #0000ff\">wp-config.php<\/span> file or PHP configuration settings via cPanel will be enough for most people, but if the limitation of the PHP memory is not allowed by your host, then the issue could be related to the resources on your current hosting package<\/p>\n<p>If you keep getting WordPress errors or your site is not performing well, you can opt for <a href=\"https:\/\/harmonweb.com\/hosting\/wp-hosting\" target=\"_blank\" rel=\"noopener\">HarmonWeb WordPress hosting<\/a> as the ideal hosting platform for your WordPress sites.<\/p>\n<p><strong>Need Extra PHP Memory?<\/strong><\/p>\n<p>If you cannot change the PHP memory limit in your hosting account appropriately, it may be the easiest thing to do to upgrade your hosting setup.<\/p>\n<p>Take a look at <a href=\"https:\/\/harmonweb.com\/hosting\/wp-hosting\" target=\"_blank\" rel=\"noopener\">HarmonWeb WordPress Hosting<\/a> and get what your website needs!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In case WordPress is showing \u201cAllowed memory size exhausted\u201d error, then this means that the limit of PHP&hellip;<\/p>\n","protected":false},"author":25,"featured_media":7954,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[287,251,34],"tags":[],"class_list":["post-7952","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-hosting","category-wordpress-performance"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Increase the WordPress PHP Memory Limit Without Breaking Your Site | HarmonWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site | HarmonWeb\" \/>\n<meta property=\"og:description\" content=\"In case WordPress is showing \u201cAllowed memory size exhausted\u201d error, then this means that the limit of PHP&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/\" \/>\n<meta property=\"og:site_name\" content=\"HarmonWeb\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-20T22:00:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2026\/08\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Adediran Samuel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Adediran Samuel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/\"},\"author\":{\"name\":\"Adediran Samuel\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/person\\\/e5ecdeaa5be92fe77baabab9b5080c1c\"},\"headline\":\"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site\",\"datePublished\":\"2026-08-20T22:00:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/\"},\"wordCount\":1626,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg\",\"articleSection\":[\"cPanel\",\"Hosting\",\"WordPress Performance\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/\",\"name\":\"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site | HarmonWeb\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg\",\"datePublished\":\"2026-08-20T22:00:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/#primaryimage\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg\",\"contentUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg\",\"width\":1920,\"height\":1080,\"caption\":\"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/\",\"name\":\"HarmonWeb\",\"description\":\"Web Hosting In Nigeria\",\"publisher\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#organization\",\"name\":\"HarmonWeb\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/cropped-HARMON-WEB-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/cropped-HARMON-WEB-LOGO-2.png\",\"width\":831,\"height\":172,\"caption\":\"HarmonWeb\"},\"image\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/person\\\/e5ecdeaa5be92fe77baabab9b5080c1c\",\"name\":\"Adediran Samuel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/7094e9183d0321d5656817fbeb1f491d.jpg?ver=1786718597\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/7094e9183d0321d5656817fbeb1f491d.jpg?ver=1786718597\",\"contentUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/7094e9183d0321d5656817fbeb1f491d.jpg?ver=1786718597\",\"caption\":\"Adediran Samuel\"},\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/author\\\/adediran-samuel\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site | HarmonWeb","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:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/","og_locale":"en_US","og_type":"article","og_title":"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site | HarmonWeb","og_description":"In case WordPress is showing \u201cAllowed memory size exhausted\u201d error, then this means that the limit of PHP&hellip;","og_url":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/","og_site_name":"HarmonWeb","article_published_time":"2026-08-20T22:00:12+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2026\/08\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg","type":"image\/jpeg"}],"author":"Adediran Samuel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Adediran Samuel","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#article","isPartOf":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/"},"author":{"name":"Adediran Samuel","@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/person\/e5ecdeaa5be92fe77baabab9b5080c1c"},"headline":"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site","datePublished":"2026-08-20T22:00:12+00:00","mainEntityOfPage":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/"},"wordCount":1626,"commentCount":0,"publisher":{"@id":"https:\/\/harmonweb.com\/blog\/#organization"},"image":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#primaryimage"},"thumbnailUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2026\/08\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg","articleSection":["cPanel","Hosting","WordPress Performance"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/","url":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/","name":"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site | HarmonWeb","isPartOf":{"@id":"https:\/\/harmonweb.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#primaryimage"},"image":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#primaryimage"},"thumbnailUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2026\/08\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg","datePublished":"2026-08-20T22:00:12+00:00","breadcrumb":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#primaryimage","url":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2026\/08\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg","contentUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2026\/08\/How-to-Increase-the-WordPress-PHP-Memory-Limit-Without-Breaking-Your-Site.jpg","width":1920,"height":1080,"caption":"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site"},{"@type":"BreadcrumbList","@id":"https:\/\/harmonweb.com\/blog\/how-to-increase-the-wordpress-php-memory-limit-without-breaking-your-site\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/harmonweb.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Increase the WordPress PHP Memory Limit Without Breaking Your Site"}]},{"@type":"WebSite","@id":"https:\/\/harmonweb.com\/blog\/#website","url":"https:\/\/harmonweb.com\/blog\/","name":"HarmonWeb","description":"Web Hosting In Nigeria","publisher":{"@id":"https:\/\/harmonweb.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/harmonweb.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/harmonweb.com\/blog\/#organization","name":"HarmonWeb","url":"https:\/\/harmonweb.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2020\/06\/cropped-HARMON-WEB-LOGO-2.png","contentUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2020\/06\/cropped-HARMON-WEB-LOGO-2.png","width":831,"height":172,"caption":"HarmonWeb"},"image":{"@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/person\/e5ecdeaa5be92fe77baabab9b5080c1c","name":"Adediran Samuel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/harmonweb.com\/blog\/wp-content\/litespeed\/avatar\/7094e9183d0321d5656817fbeb1f491d.jpg?ver=1786718597","url":"https:\/\/harmonweb.com\/blog\/wp-content\/litespeed\/avatar\/7094e9183d0321d5656817fbeb1f491d.jpg?ver=1786718597","contentUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/litespeed\/avatar\/7094e9183d0321d5656817fbeb1f491d.jpg?ver=1786718597","caption":"Adediran Samuel"},"url":"https:\/\/harmonweb.com\/blog\/author\/adediran-samuel\/"}]}},"_links":{"self":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts\/7952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/comments?post=7952"}],"version-history":[{"count":8,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts\/7952\/revisions"}],"predecessor-version":[{"id":7961,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts\/7952\/revisions\/7961"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/media\/7954"}],"wp:attachment":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/media?parent=7952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/categories?post=7952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/tags?post=7952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}