WordPress Upload Limit – .user.ini

Print Friendly, PDF & Email

Importing Posts – Size Limits:

sudo vi /etc/php/7.0/apache2/php.ini

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 0

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 20M

Using .user.ini

If that local method can't work for you due to remote hosting, you may have another option. This will only work if you are using a version of PHP 5. Otherwise, you can skip this section.

Create a new file, and this time call it ".user.ini". In that file, paste the following code:

upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 64M
max_execution_time = 300

You can change the value of 64M to match your new desired upload limit. Save this file, and then drag it into the directory of your WordPress install using FTP. If you have the ability to restart your server, you should do so. The changes may take a bit to take effect, but go to Media -> Add New to confirm.