This is an odd problem.
I've a client who is a photographer and who will often be uploading very large images - 10 megabytes, or 15 megabytes. I'm using WordPress to give him a way to control the site.
I've got a server on the Rackspace cloud. We use Virtualmin to manage the server settings. I create a development site and default max file upload is 2 megabytes. So I go to Virtualmin and change this 20 megabytes. For some reason this has no effect. I have no time to figure out why, so I cheat a little and create an .htaccess file, where I put:
php_value upload_max_filesize 20M
Now WordPress says the maximum upload file size is 8 megabytes. I am surprised by this. I create a file on the server with just this code:
phpinfo();
I point my browser at this file and I see:
max_file_uploads 20 20
So, PHP now thinks that the max upload is 20 megabytes. but WordPress is stuck on 8 megabytes. Why is this?
Michael Fields answers:
Have you tried post_max_size 20M as well?
Lawrence Krubner comments:
I did raise post_max_size to 20M, but only in Virtualmin and for some reasons those settings don't seem to be having an effect, so this is a good idea. I'll add this to the .htaccess.
Vidyut Kale answers:
At the top of your wp-config.php
define('WP_MEMORY_LIMIT', '64M');
Vidyut Kale comments:
Sorry, sent it early by mistake.
Like Michael says, add to your .htaccess
php_value upload_max_filesize 20M
php_value post_max_size 20M
Or whatever number you want.