How to increase upload_max_filesize

There are some ways that you can choose to increase the maximum upload file size in WordPress.

  1. Edit /etc/php.ini file & /home/user/etc/php.ini

upload_max_filesize 128M
post_max_size 128M
memory_limit 256M
max_execution_time 300
max_input_time 300

Change the numbers to the values that you need. The max execution time and max input time values are in seconds and might need to be increased further if your internet connection is slow.

2. You can try .htaccess method where by modifying the .htaccess file in the root directory, you can increase the maximum upload size in WordPress. Edit the .htaccess file in your WordPress site’s root folder and add the following code:

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

Note : if you are on a shared hosting package, then these techniques may not work. In that case, you would have to contact your vps provider to increase the limit for you.

Thank you for reading this article.

Was this helpful?

1 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *