What is WordPress Error – Memory Limit and how do I fix it? Print

  • WordPress Error, Allowed Memory Size Exhausted, Increase PHP memory Limit, WordPress Troubleshooting, PHP Configuration, Web Hosting Tips, wpconfig, WordPress Support, Memory Limit Error, PHP Settings, cPanel Tips, Direct Admin
  • 0

When Your WordPress Site Runs Out of Memory

If your WordPress website needs more memory than what’s currently allocated, you may encounter an error message like this:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/xxx/public_html/wp-includes/plugin.php on line xxx

 

How to Fix This Issue

There are several ways to resolve this problem. Below are the most common methods:

  1. Increase Memory Limit via Hosting Panel
  • Log in to your hosting account (DirectAdmin or cPanel).
  • Navigate to Select PHP VersionOptions.
  • Find Memory Limit and increase the value (e.g., from 512MB to 2GB).
  • Click Apply to save the changes.

 

  1. Update Memory Limit in WordPress Configuration

If the error persists, the issue might be caused by the memory limit defined in your WordPress files.

  • Go to File Manager.
  • Open the file:
  • /home/xxx/public_html/wp-config.php
  • Locate and edit the memory_limit setting in this file, increasing it as needed.

 

  1. Check Additional Files That Can Affect Memory Limit

Other configuration files may override the memory settings. Check and adjust these if necessary:

/home/xxx/.htaccess

/home/xxx/public_html/.htaccess

/home/xxx/user.ini

/home/xxx/public_html/user.ini

 

If these steps don’t resolve the issue, the problem could be caused by a theme or plugin that is enforcing its own memory limit in another file.

For further assistance, please contact our Support Team.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution