Increasing the upload_max_filesize in WordPress

how to increase maximum file upload size in Wordpress
how to increase maximum file upload size in Wordpress

Are you facing any issue while upload files like themes and plugins via WordPress dashboard?

You are getting error like “The uploaded file exceeds the upload_maximum_filesize directive in php.ini”

Which looks something like this

upload max file size error
upload max file size error

Then you are on the right place.

So in this post I will show exactly how to increase the upload_max_filesize directive step by step.

So lets get started.

Increasing the upload_max_filesize in WordPress

The default upload file size for WordPress is 2 MB, which is a problem if you want to upload a large media files. If you get this error, “The uploaded file exceeds the upload_max_filesize directive in php.ini”, follow these steps:

  1. Locate the php.ini file inside the wp-admin directory.
  2. Find this line in the php.ini file “upload_max_filesize = 2M” and replace it with a higher value (e.g. “upload_max_filesize = 256M”)
  3. You may also want to increase your max post size. Look for this line in your php.ini file “post_max_size” and increase it as well.
  4. Save the changes to the file inside your wp-admin directory.
  5. Try the upload again
  6. If you still have issues, look for this file in your root directory and make the same changes.

If you don’t have a php.ini file in your directory, you can usually generate one from the control panels of your host. BlueHost has the steps listed to generate a php.ini file.

I have already increased the upload_max_filesize and the post_max_size to 256M. Once this file is copied into your wp-admin folder, the problem should be solved.


So I hope you fixed the “increase the upload_max_filesize” error by following the above steps.

Please share with your friends who are facing this type of issues

Also subscribe to my blog so that you receive latest post updates.

Also Read:

Best WordPress Maintenance Mode Plugins
15 Must Have WordPress Plugins For Bloggers To Use
How To Backup And Restore WordPress Site With Updraftplus


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.