Live & Learn: WordPress & Memory Limits

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.

That’s bone… and the lettering is something called…

I didn’t use Silian Rail and it’s not quite bone but it is the new CNCPTS business card.

CNCPTS Business cards front

CNCPTS Business cards back