Hi I am a beginner at WordPress and am currently trying to increase my file upload size.

So far I've tried two ways:

The first way was to add this to the bottom of the functions.php file:

@ini_set( 'upload_max_filesize' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

That didn't seem to work.

The second way I tried was to install the PHP Settings plugin and add this to the file

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

However, when I try to verify that my change updated by clicking on Media > Add New, I still see 8MB as the max file size:

enter image description here

How would I do this? I'm trying to upload a theme that's 8MB+ and it won't work because of this limitation.

P.S. I'm using MAMP to start my server.

  • 2
    If you have access to the php.ini file on the server, you would set max_upload_size there (and restart the apache process). Otherwise, you should be able to create an .htaccess file in the root of your wordpress site, and add php_value upload_max_filesize 30M – JakeParis Nov 30 '18 at 21:42

1] To do this, change the upload_max_filesize and post_max_size directives in your php.ini file. To ensure that file uploads work correctly, the post_max_size directive should be a little larger than the upload_max_filesize. For example, the following settings demonstrate how to set a file upload limit to 20 megabytes:

upload_max_filesize = 20M
post_max_size = 21M

2] You need to add the following codes at the bottom of the .htaccess file:

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300

ref links: https://kinsta.com/blog/wordpress-maximum-upload-file-size/ https://kinsta.com/blog/wordpress-maximum-upload-file-size/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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