increase the upload_max_filesize in WordPress

increase the upload_max_filesize in WordPress

The default upload file size is in php settings is 2 MB and for wordpress also default upload size is 2 MB. File upload size is dependent on PHP settings of your server. Upload size is also dependent on your hosting plan or hosting service provider. For shared hosting most of time you cannot increase the file upload limit.

increase the upload_max_filesize in WordPress

When we try to upload big size image or media files in wordpress we got the following error

The uploaded file exceeds the upload_max_filesize directive in php.ini
For fixing the issue use following steps
Use the php.ini file from root folder.

1. Find this line in the php.ini file in your php installation upload_max_filesize = 2MB and replace it with a higher value (e.g. upload_max_filesize = 64MB)
2. Search for this line in your php.ini file post_max_size and increase it.

If you don’t have a php.ini file in your directory,
you can usually generate one from the control panels of your host. or create the file and put following values in that
memory_limit = 32M
upload_max_filesize = 100M
upload_max_filesize = 100M
post_max_size = 100M

increase the upload_max_filesize in WordPress
increase the upload_max_filesize in WordPress

This file is copied into your wp-admin folder, the problem should be solved.

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

3 thoughts on “increase the upload_max_filesize in WordPress”

  1. Had this problem a few weeks ago and this is exactly what I did on my host, it is important that you put the php.ini file inside your wp-admin folder though – this worked fine for me.

Leave a Reply

Your email address will not be published.