Try wp-config.php –
define('WP_MEMORY_LIMIT', '256M');
@unalignedcoder The maximum upload size is controlled at the server-level, not by WordPress. Here are three ways you can increase the upload limit:
You need to make sure that you have set *both* upload_max_filesize *and* post_max_size as setting just one won’t do it.
1. If you can edit or override the system php.ini file, increase the maximum file and post sizes. For example, upload_max_filesize = 100M ; and post_max_size = 100M ;
2. If you cannot edit or override the system php.ini file, add php_value upload_max_filesize 100M and php_value post_max_size = 100M to your .htaccess file.
3. If neither of these work, it’s time to ask your hosting provider to increase the maximum file and post sizes on your account. Keep in mind that most decent hosting providers allow this, and If your hosting provider won’t accommodate you, perhaps it’s time to find a new hosting provider.
(in the above examples, the limit is set to 100MB)
@neotechnomad define('WP_MEMORY_LIMIT' increases the RAM/memory allocated to PHP, it doesn’t affect upload size. Though RAM/memory allocation can sometimes affect uploads, it doesn’t set the upload limit. https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
@neotechnomad define(‘WP_MEMORY_LIMIT’ increases the RAM/memory allocated to PHP, it doesn’t affect upload size. Though RAM/memory allocation can sometimes affect uploads, it doesn’t set the upload limit. https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
You’re right. I was mistaken in this case.
No worries, I learned most of what I know because of mistakes here and there. π
Thanks all for the input! James, thank you, I think you were right as “post_max_size” is still set to “8M”! you would expect people from a hosting service to know about this when a client ask them to raise the limit, what is the point to raise one to 256 and leave the other one untouched? I’ve contacted them, hopefully this will work —
I used to know all this server/php stuff real well but it’s amazing how much of a software you can forget once you stop using it even for a short while.
… Ok, now wp gives the correct upload limit of 256 Megabytes in the media upload panel.
however as soon as I try to upload a video of ~50 M, it gives me an unspecified “http error”. π
Of course this doesn’t happen with your regular ~ 5M file…
worth noticing, I am in debug mode but wp isn’t verbose at all. π
Let’s boost PHP’s memory allocation too.
Here are three ways to increase PHP’s memory allocation:
1. If you can edit or override the system php.ini file, increase the memory limit. For example, memory_limit = 128M
2. If you cannot edit or override the system php.ini file, add php_value memory_limit 128M to your .htaccess file.
3. If neither of these work, it’s time to ask your hosting provider to temporarily increase PHP’s memory allocation on your account. Keep in mind that most decent hosting providers allocate 32 MB to PHP under each account, and most decent hosting providers allow users to temporarily increase the memory allocation. If your hosting provider won’t accommodate you, perhaps it’s time to find a new hosting provider.
(in the above examples, the limit is set to 128MB)