Fatal error Allowed memory plugin.php in WordPress

Solution:

To increase WordPress memory to 64MB add the following to wp-config.php:

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

From official WordPress documentation on increasing memory limit:

WP_MEMORY_LIMIT option allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary in the event you receive a message such as “Allowed memory size of xxxxxx bytes exhausted”.

Please note, this setting may not work if your host does not allow for increasing the PHP memory limit–in that event, contact your host to increase the PHP memory limit. Also, note that many hosts set the PHP limit at 8MB

You’d expect to run out of memory eventually if you keep adding plugins. In your case, 33554432 bytes is exactly 32MB, which is four times as generous as expected above. But your web host may still allow you to increase. If not, it might be time to move web hosts. Good luck.

Solution:

Deactivate all plugins and activate one by one to find the problematic plugin.

Here is what I would do.

  • Rename the Plugin folder to say /plugin_off/
  • Try to login to wp-admin and if the issue is with plugins you will be able to login.
  • Go to the Plugins page and all the plugins will be deactivated(because files are not there).
  • Rename the Plugin folder back to /plugin/
  • Activate plugins one by one till you get the same issue.
  • The last one activated before issue is causing trouble. (You can either decide not to use it or check plugin forum to see similar issue or increase memory limit to say 64MB and try or debug the plugin yourself.)