WordPress Maximum upload file size: 2 MB

Need to be reminded: This is a PHP’s limitation rather than wordpress. So, your should try to modify php’s setting not wordpress’. You should modify the php.ini file.

In CentOS and Red Hat based Operating system,the path of php.ini file is /etc/php.ini

In Ubuntu and Debian based Operating system,the path of php.ini file is /etc/php5/apache2/php.ini

OR

Use the command find to know the absolute path of php.ini file

find / -name php.ini

Edit the php.ini file, find and replace the value.(not only the upload_max_filesize but also the post_max_size’s value should be modified)

file_uploads = On
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 300s
memory_limit = 128M

 

Note:
file_uploads = To allow HTTP file uploads.
upload_max_filesize = Maximum allowed size for uploaded files
max_execution_time = Maximum execution time of each script, in seconds
memory_limit = Maximum amount of memory a script may consume (128MB)
post_max_size = 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.

Restart the apache after editing the php.ini

You have to restart the apache web service to make the changes effective

/etc/init.d/httpd restart     (In CentOS and Red Hat)

/etc/init.d/apache2restart     (In Ubuntu and Debian)

 

Add a Comment

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

20 − eighteen =