I am running a local dev installation of Wordpress. I try to upload a 32MB video but I can't increase the upload file size past 8M.

My php.ini is set to 200M

upload_max_filesize = 200M

I have restarted php fpm and even apache2. Then I tried to add

@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );

to functions.php

Still the max upload size remains unchanged 8M.

2 Answers 2


The @ini_set() option is upload_max_filesize, not upload_max_size. See the full list on PHP.net.


Use a standard text editor to open /etc/php/apache2/php.ini, search for the following variables and change/increase these to:

memory_limit = 512M

upload_max_filesize = 512M

post_max_size = 512M

save the changes and restart apache

sudo service apache2 restart


sudo systemctl restart apache2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.