Choose another country or region to see content specific to your location and shop online.
United States
USA

WordPress Memory Exhausted Error – Increase PHP Memory Limit

Are you getting a WordPress error that says allowed memory size exhausted? This is one of the most common WordPress issues, and it’s simple to remedy by increasing WordPress’s PHP memory limit.
In this article, we’ll teach you how to increase PHP memory in a few different ways to fix the WordPress memory exhausted problem.

What is the WordPress Memory Exhausted Error?

PHP is a server-side programming language, and WordPress is written in it. For a website to work effectively, it requires a WordPress hosting server.

Web servers operate in the same way as any other computer. They require memory to execute numerous apps or programs efficiently at the same time. Different applications, including PHP, are allotted different amounts of memory by server administrators.

When you see the below error – you can be sure that this error is caused by your PHP memory limit being too low for the processes and applications you are running.

WordPress is clever, if your PHP memory limit is less than 64MB it will automatically attempt to increase it. However, 64MB is frequently inadequate for the vast majority of WordPress users.

With that being said, let us show you how to easily increase the PHP memory limit in WordPress to prevent and avoid the memory exhausted error.

Increase PHP Memory Limit in WordPress

There are a couple of different methods that I’ll be showing you.

1. Editing the wp-config.php file on your WordPress site

To get started, go to your WordPress site’s wp-config.php file and make the necessary changes. The wp-config.php file is located in the root folder of your WordPress site, and you’ll need to use an FTP client or your web hosting cPanel’s file manager to access it. Once you’re into your file manager simply go to your ‘public HTML’ folder and you’ll then see the wp-config.php file in there.

If you’re using Managed WordPress Hosting follow the below instructions to find the ‘File Manager’.

  1. Go to your ELITE WEB Co. product page.
  2. In the Managed WordPress section, select Manage next to the website you want to edit.
  3. Click on ‘Tools’ from the menu.
  4. Then select ‘File Browser’

Once you have opened the file you will scroll down until you get to the line that says ‘That’s all, stop editing! Happy blogging.’ Above this line, you need to add this code into the wp-config.php file.

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

This code tells WordPress to increase its PHP memory limit from 64MB to 256MB. Once this is done you’ll need to save your changes or upload your file back to the server depending on how you’re editing the file.

Once the changes have taken effect the memory exhausted error should be gone. If it hasn’t, simply increase the limit to 512M as shown below.

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

2. Using the MultiPHP INI Editor within cPanel

If you have access to your cPanel you can scroll down to the ‘Software’ tab and click on the option ‘MultiPHP INI Editor’.

If you have Web hosting with Elite you can access your cPanel using the steps below before moving on to increasing the PHP memory limit.

  1. Go to your ELITE WEB Co. product page.
  2. Under Web Hosting, next to the Linux Hosting account you want to access and click ‘Manage’
  3. Then click on ‘cPanel Admin’. This will log you into your control panel.

Once you’ve opened the editor you need to select the website you’re editing from the dropdown that says ‘Select a location’

After you’ve selected your website the page will drop down showing you various different options. From here just scroll down until you see ‘Memory limit’, which you can then increase on the right hand side.

After increasing the limit the memory exhausted error should have disappeared.

Note: If the above methods do not work for you, it likely means that your web hosting provider doesn’t allow you to increase the PHP memory limit yourself. If that is the case then you’ll have to directly get in contact with your web hosting provider and request that they increase your PHP memory limit

For more help articles on WordPress or Web Hosting (Linux cPanel), Click here.

New customer

New to ELITEWEB.Co? Create an account to get started today.

Registered users

Have an account? Sign in now.

Reseller login

If you’re a reseller, use the button below to sign in. (your reseller account is separate to your regular account)

Reseller login

If you’re a reseller, use the button below to sign in. (your reseller account is separate to your regular account)

New customer

New to ELITEWEB.Co? Create an account to get started today.

Registered users

Have an account? Sign in now.