I got the error “Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 49152 bytes) in /home/wellington/public_html/dev/wp-admin/includes/file.php on line 357” when installing plugin in wordpress.

By default, WordPress automatically tries to increase PHP memory limit if it is less than 64MB. However, 64MB is often not high enough.

Ans: To avoid this put this code in wp-config.php file “define( 'WP_MEMORY_LIMIT', '256M' );” just after the code “define(‘WP_DEBUG’, true);”.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)