Contact us today for your FREE consultation
How Check and Change WordPress / Woocommerce PHP Memory Limit

How Check and Change WordPress / Woocommerce PHP Memory Limit

Important note: Some hosts such as Godaddy have restrictions on the amount of memory available. Increasing your PHP memory limit may cause issues on your website, or you may not have access to certain sections in this guide. It is advised to contact your host if you are uncomfortable with the following steps.


A low PHP memory limit can cause several issues on your WordPress website:

  • PHP errors (Memory exhausted or low memory issue)
  • White Screen of Death
  • Slow loading website or slow loading admin
  • Cart issues on Woocommerce

Some servers (shared hosting planes usually) have a very low limit to PHP by default which can cause a blank screen (white screen of death) or an error on your site.

How to tell if WordPress is having memory issues:

With WordPress 5.2, an information screen has replaced the White Screen of death, the information screen will provide you an a recovery link to provide access to your WordPress backend, alongside showing you what error your website is displaying.

Here are some methods to check for low memory issues:

Check Error logs on Cpanel

Modern Cpanel hosting will allow you to view error logs that can provide details on any issues you may be experiencing. You can view error logs under Go to Metrics > Errors.

Additionally WordPress includes an error log within the file directory of your server. To view your WordPress error logs, you need to enable them in your wp-config.php file. First, you will want to connect to your site via SFTP / FTP or File Manager. Then download your wp-config.php so you can edit it.

Find the line that says /* That’s all, stop editing! Happy blogging. */ and just before it, add the following (as seen below):

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

In your error logs, you would be looking for a message that says:
Fatal error: Allowed memory size of [memory amount] bytes exhausted

Important note: Once you are completed, you need to change define WP_DEBUG & WP_DEBUG_LOG to false.

WordPress White Screen of Death

With WordPress 5.2, if your website hits the memory limit you will see a white screen that says “This site is experiencing technical difficulties” and an error log will be displayed at the bottom.

In your error logs, you would be looking for a message that says:
Fatal error: Allowed memory size of [memory amount] bytes exhausted

WordPress Backend – Check Memory Limit

With WordPress 5.2 or Woocommerce, you can check your available memory easily in the WordPress backend.

For WordPress:

  • Go to tools > Site Health.
  • Click info at the top screen
  • Click server
  • PHP memory limit is your website memory limit

For Woocommerce:

  • Go to Woocommerce > Status
  • WordPress memory limit is your website memory limit

How in increase memory limit

The best way to increase your memory limit is by creating a php.ini file, or modifying an existing file through Cpanel. You can also modify your memory limit through editing a file in your WordPress install.

In Cpanel:

  • Login to Cpanel
  • In the Software/Services section of the cPanel home screen, click Select PHP Version:
  • Locate the memory_limit row, select the new value for the script memory limit, and then click Apply.
  • Click Save to save the settings. The new PHP setting takes effect immediately.

Important Note: If you can’t find this under select PHP version, it may be located under MultiPHP INI Editor

Editing WP Config

You can also increase your memory limit by editing your WP Config file on your server.
First, you will want to connect to your site via SFTP / FTP or File Manager. Then download your wp-config.php so you can edit it.

Find the line that says /* That’s all, stop editing! Happy blogging. */ and just before it, add the following (as seen below):

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

Replace “256M” with the memory amount you need, or your hosting provider has available.

Save, and reupload the file.

Advertisement:
368 Durham is a Website Design Company in Oshawa & Whitby. We build Custom Online Stores utilizing the latest technology to engage with your customers and build your brand. We offer Website Design, E-commerce Design, Search Engine Optimization and Social Media Management in Oshawa.

Leave a Reply

Our Recent Blog Posts

View more blog posts

We work with some great clients

previous arrow
next arrow
Slider

Ready to get started?

Let's chat.

Phone: 647-215-9408

E-mail: [email protected]

368 Durham has been working with businesses and organizations since 2011. We offer Website Design and Custom Solutions in Bowmanville, Newcastle, Whitby, Oshawa and all of Durham Region.

We've got the skills to build your website and the customer service to back it up. All of our website consultations are free, it costs you nothing to learn more about our services.

Contact Us
By using our website, you agree to the Privacy Policy. All content is copyright 368 Durham © 2011.