Increase WordPress Memory Limit

Nothings worse then getting an email about someone being unable to upload a 6mb .PDF because it “exceeds the upload file size limit

Here’s the fix – but important note: raising postmaxsize increases the possibility of DoS attacks on your server:

In functions.php add:

If that doesn’t work, it could be a apache restriction, inย .htaccess add:

If you’re still unable to it could be a php restriction, in php.ini add:


Obviously change the 32mb/32000kb as needed.

Update:

The above worked for me 99% of the time, but I had once instance where I need to add the following into functions.php as well:


Leave a Reply

%d bloggers like this: