Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need to increase size allocated php.ini file

I just bought a WP theme and when I attempt to upload the .zip file I get the error and "the uploaded file exceeds the upload_max_filesize directive in php.ini".  I contacted the theme support and they said "contact your hosting provider and ask them to increase the memory allocated to your site under php.ini file to overcome the issue."  Can someone help me with this?

Helper VI

@ab1183 you just have to create a .user.ini file in the root folder of your site. Here's what you put in it:

memory_limit = 1024M
max_execution_time = 320
max_input_time = 240
post_max_size = 120M
max_input_vars = 2000
file_uploads = 6
max_file_uploads = 20
upload_max_filesize = 100M


If you are on a plan that gives you 512M of ram, you should change the memory_limit directive to 512M.

You can also tell WordPress how much memory can it take, by adding this to your wp-config.php:

define( 'WP_MAX_MEMORY_LIMIT', '1024M' );

 The same goes for the WP_MAX_MEMORY_LIMIT.


Hope it helps!

If you find my replies helpful, give me a like or kudo 🙂
And if I solved your issue, mark it as solution 😄

I have tried many methods lately, this is the only method that as worked for me. Thank you so much how posting this!