If you’re a new blogger or a WordPress developer, you’ll most likely encounter this frustrating problem we’ve had: PHP memory limit. We don’t know why WordPress doesn’t bundle this error fix with their starter blog files but we guarantee this will work on most PHP memory limit problems.
We’ve researched on several articles related to this issue but nothing addressed to it seems to solve it specifically. This fix will work on most issues related to the folder wp-includes.
We found a solution from PerishablePress.com that we wanted to share.
How To Solve PHP Memory Limit on WordPress
- Open your wp-includes/cache.php and place this code immediately after the <?php tag:
ini_set('memory_limit','64M'); // set memory to prevent fatal errors
- Create an .htaccess file inside the wp-includes folder. Open the file and paste this code:
# set memory limit for cache.php php_value memory_limit 64M
- Then create a php.ini file in the same folder. This time, open the file and copy-paste this code:
;; set memory limit for cache.php memory_limit = 64M
There you have it! WordPress Fix: Increase memory on wp-includes, solved!
If the issue still persists, your whole WordPress website may be compromised by any plugin you may or may not have recently installed. Deactivate it and test if your site will be restored.