Jump to content

WordPress Memory Exhausted Error – When you encounter a “Memory Exhausted” error in WordPress, it means that your site has exceeded the memory limit allocated by your server. This is often due to large plugins, themes, or high traffic consuming more memory than the default limit allows.

Here’s a concise guide to understanding and resolving this issue:

wordpress-dashboard-showing-memory-error.webp

Increase PHP Memory Limit in wp-config.php

  1. Access Your WordPress Files:

    • Connect to your website via FTP/SFTP using a client like FileZilla or use your hosting provider’s file manager.

  2. Edit wp-config.php:

    • Locate the wp-config.php file in the root directory of your WordPress installation.

    • Download the file to your computer and open it in a text editor.

  3. Add the following line just above the line that says /* That's all, stop editing! Happy blogging. */:

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

  5. Save the changes and re-upload the file to your server, overwriting the existing file.

Increase PHP Memory Limit in php.ini

  1. Access php.ini File:

    • If your hosting provider allows access to php.ini, you can edit this file to increase the memory limit.

    • Locate the php.ini file, often found in the root directory of your site or a directory specific to PHP settings.

  2. Edit php.ini:

    • Open the php.ini file in a text editor.

    • Find the line that sets memory_limit and change it to

      memory_limit = 256M

    • Save the file and restart your web server if required (some hosting providers handle this automatically).

Increase PHP Memory Limit in .htaccess

  • Access .htaccess File: Locate the .htaccess file in the root directory of your WordPress installation.

  • Edit .htaccess:

    • Open the file in a text editor.

    • Add the following line to increase the memory limit:

      php_value memory_limit 256M

    • Save the file and re-upload it to your server.

Contact Your Hosting Provider

If none of the above methods work or you don’t have access to the necessary files, contact your hosting provider for assistance. They may be able to increase the memory limit for you or provide guidance on how to do it on their platform.

Additional Tips:

  • Verify Changes: After making these changes, check if the error is resolved. You can also use WordPress plugins like “Site Health” or “Query Monitor” to check the memory limit.

  • Consider Plugin or Theme Conflicts: If the memory limit increase doesn’t resolve the issue, it could be due to a plugin or theme conflict. Try deactivating plugins or switching themes to troubleshoot.

By following these steps, you can effectively increase the PHP memory limit and resolve the “WordPress Memory Exhausted Error.”

0 Comments

Recommended Comments

There are no comments to display.

Guest
Add a comment...

Important Information

By using this site, you agree to our Privacy Policy, Terms of Use, and Guidelines. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.