Live & Learn: WordPress & Memory Limits


Warning: Illegal string offset 'wordbooker_share_button_post' in /homepages/12/d88744284/htdocs/cncpts/blog/wp-content/plugins/wordbooker/wordbooker.php on line 1784

Warning: Illegal string offset 'wordbooker_share_button_page' in /homepages/12/d88744284/htdocs/cncpts/blog/wp-content/plugins/wordbooker/wordbooker.php on line 1785

Warning: Illegal string offset 'wordbooker_like_button_post' in /homepages/12/d88744284/htdocs/cncpts/blog/wp-content/plugins/wordbooker/wordbooker.php on line 1937

Warning: Illegal string offset 'wordbooker_like_button_page' in /homepages/12/d88744284/htdocs/cncpts/blog/wp-content/plugins/wordbooker/wordbooker.php on line 1938

Warning: Illegal string offset 'wordbooker_like_button_post' in /homepages/12/d88744284/htdocs/cncpts/blog/wp-content/plugins/wordbooker/wordbooker.php on line 1856

Warning: Illegal string offset 'wordbooker_like_button_page' in /homepages/12/d88744284/htdocs/cncpts/blog/wp-content/plugins/wordbooker/wordbooker.php on line 1857

Over the past two years I’ve built a lot of sites in WordPress and time and time again I run into memory limit problems. Despite the active community around WordPress I am never able to get a clear and straight answer on how resolve this problem. You may run into other blog posts explaining how to add a few lines to your .htaccess file or changing a single line in your wp-settings.php file but none of these solutions will work.

So after hours of troubleshooting i’m happy to share a simple, clear and concise solution to WordPress Memory Limits, using a php.ini file.

NOTE: Before starting I suggest checking the current upload limits and memory limits on your site, you can do this by installing TCP! Memory Usage plugin, then go to the PHP tab.

  1. Create a new file in any text editor, Notepad, Textmate or even Text Edit.
  2. Determine how much memory you will need, all WordPress sites default at 32M, I typically bump mine to 64M
  3. In the new text file add the following lines:
    memory_limit = 64M
    upload_max_filesize = 64M
    post_max_size = 64M
  4. Now save your file as “php.ini”
  5. Lastly, this file MUST BE UPLOADED TO THE WP-ADMIN directory on your WordPress site.

That’s it, I hope this will be helpful to anyone struggling with WordPress Memory Limits or Upload Limits.

Category: Live & Learn

Tagged: , , , , , , , , , , ,

Leave a Reply