Fixing the WordPress Memory Exhausted Error Print

  • 0

The WordPress memory exhausted error occurs when your site exceeds the allowed PHP memory limit. It often displays as a Fatal error: Allowed memory size of... exhausted message. Here’s how to fix it:

  1. Increase PHP Memory Limit:
    • Access your wp-config.php file and increase the memory limit:
      1. Use FTP or File Manager to access your site’s files.
      2. Open wp-config.php in a text editor.
      3. Add the following line before the “Happy blogging” line:
        php
        define( 'WP_MEMORY_LIMIT', '256M' );
      4. Save the file and re-upload it.
  2. Increase Memory via php.ini:
    • If the above step doesn’t work, you can try increasing memory via the php.ini file:
      1. Access the public_html or root directory.
      2. Look for the php.ini file. If it doesn’t exist, create one.
      3. Add the following line:
        plaintext
        memory_limit = 256M
      4. Save and upload the file.
  3. Edit .htaccess:
    • Another option is to modify the .htaccess file:
      1. Open the .htaccess file.
      2. Add the following line:
        plaintext
        php_value memory_limit 256M
      3. Save and re-upload the file.

Was this answer helpful?

« Back