WordPress Fix: Increase Memory on wp-includes

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.

This requires a fair amount of knowledge on navigating your cPanel or using an FTP program like FileZilla. You can raise or lower your memory depending on your requirement. 64M worked best for our website and it handles WooCommerce and LearnPress.

How To Solve PHP Memory Limit on WordPress

  1. 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
  2. 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
  3. 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.

Leave a Reply