How to Fix WordPress Memory Exhausted Error

The "Fatal Error: Allowed Memory Size of Bytes Exhausted" in WordPress occurs when your website consumes more PHP memory than what is allowed by your server's configuration. This can lead to a white screen or an error message and render your website inaccessible. To fix this error, you'll need to increase the PHP memory limit. Here's how you can do it:

Option 1: Edit the wp-config.php File

  1. Access Your Website's Files:

    • Use an FTP client like FileZilla or access your website's file manager via your hosting control panel.
  2. Locate the wp-config.php File:

    • The wp-config.php file is typically located in the root directory of your WordPress installation.
  3. Edit the wp-config.php File:

    • Right-click on wp-config.php and choose to edit it with a text editor.
  4. Increase the Memory Limit:

    • Add the following line of code just before the line that says "That's all, stop editing! Happy blogging.":
     
    define('WP_MEMORY_LIMIT', '256M');

    You can adjust the value '256M' to a higher amount if needed, depending on your website's requirements and server capabilities.

  5. Save the File:

    • Save the changes to wp-config.php and upload it back to your server if you downloaded it through FTP.
  6. Check Your Website:

    • Visit your WordPress website to see if the error is resolved. Your site should now load without memory-related issues.

Option 2: Edit the php.ini File

If you have access to your server's php.ini file (not all hosting environments provide this access), you can increase the memory limit by editing it:

  1. Locate the php.ini file on your server (usually in the root directory).

  2. Open php.ini with a text editor.

  3. Search for the line that sets the memory_limit parameter. It will look like this:

    memory_limit = 128M
  4. Increase the memory_limit value, for example, to '256M'.

  5. Save the php.ini file.

After making any of these changes, your WordPress website should have an increased PHP memory limit, and the "Allowed Memory Size Exhausted" error should be resolved. If you're unsure about making these changes yourself, consider seeking assistance from a developer or your hosting provider's support team.

 

If your looking to setup a new account or to transfer your existing WordPress Web Hosting Ozzietel offers WordPress Web hosting.

  • WordPress Memory Exhausted Error, WordPress Errors, WordPress Memory Limits, WordPress Web Hosting
  • 351 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix WordPress White Screen of Death (WSOD)

The WordPress White Screen of Death (WSOD) is a common issue that can leave you puzzled and...

How to fix WordPress Internal Server Error (HTTP 500 Error)

The dreaded "Internal Server Error" in WordPress, also known as the HTTP 500 error,...

How to fix WordPress Error Establishing Database Connection

The "Error Establishing Database Connection" is a common issue in WordPress that...

How to fix WordPress Login Page Refresh/Redirect Loop

The WordPress login page refresh or redirect loop issue can be a perplexing and...