Skip to content
SW Study Warehouse
Home › Blog
Blog

How to Increase WordPress Memory Limit (wp-config.php Fix 2026)

By Pardeep Patel · November 25, 2026 · 3 min read ๐Ÿ‘ 129 Views
How to Increase the WordPress Memory Limit - WP Memory Limit
Disclosure: Some links in this guide are affiliate links. We may earn a commission at no extra cost to you.

Understanding increase wordpress memory limit gives you clear, practical steps and best practices you can apply right away. Below is the complete breakdown, key guidelines, and helpful references.

Complete Guide: Increase WordPress Memory Limit

Are you seeing an allowed memory size exhausted error in WordPress? This is one of the most common WordPress errors, and you can easily fix it by increasing the php memory limit in WordPress. In this article, we will show you how to fix WordPress memory exhausted error by increasing PHP memory (to Increase the WordPress Memory Limit)

What is WordPress Memory Exhausted Error? (WP Memory Limit)

WordPress is written in PHP, which is a server-side programming language. Every website needs a WordPress hosting server for it to function properly.

Web servers are just like any other computer. They need memory to efficiently run multiple applications at the same time. Server administrators allocate specific memory size to different applications including PHP.

When your WordPress code requires more memory than the default allocated memory, you get the WordPress Memory Exhausted Error.

By default, WordPress automatically tries to increase PHP memory limit if it is less than 64MB. However, 64MB is often not high enough.

Having said that, letโ€™s see how to easily increase PHP memory limit in WordPress to avoid memory exhausted error.

Read Also: Steps to create a website from scratch on Bluehost

Increase PHP Memory Limit in WordPress

First you need to edit the wp-config.php file on your WordPress site. It is located in your WordPress siteโ€™s root folder, and you will need to use an FTP client or file manager in your web hosting control panel.

Next, you need to paste this code in wp-config.php file just before the line that says โ€˜Thatโ€™s all, stop editing! Happy blogging.โ€™

define( 'WP_MEMORY_LIMIT', '256M' );

This code tells WordPress to increase the PHP memory limit to 256MB.

Once you are done, you need to save your changes and upload your wp-config.php file back to your server.

You can now visit your WordPress site and memory exhausted error should disappear now.

If you are new to WordPress, then take a look at our beginners guide on how to copy and paste code from the web.

We also have a step by step guide on how to find and edit wp-config.php file.

Note: If this solution does not work for you, then this means your web hosting service provider does not allow WordPress to increase PHP memory limit. You will need to ask your web hosting provider to increase your PHP memory limit manually.

Thatโ€™s all we hope this article helped you solve WordPress memory exhausted error by increasing PHP memory limit (WP Memory Limit).

Key Takeaways & Resources for Increase WordPress Memory Limit

For official details, review WordPress Developer Docs or continue with our WP Rocket vs FlyingPress.

Found this guide helpful? Support Team StudyWarehouse! Buy Us a Coffee

Pardeep Patel

Hi!, I am Pardeep Patel, an Indian passport holder, Traveler, Blogger, Story Writer. I completed my M-Tech (Computer Science) in 2016. I love to travel, eat different foods from various cuisines, experience different cultures, make new friends and meet other.

Leave a Reply

Your email address will not be published. Required fields are marked *