Are you unable to upload media file in wordpress ? Well, you don’t have to worry about this common limitation set by wordpress. Usually, upload file size error occur when we try to upload a heavy file like a video, or a PDF file, or any other media, exceeding the upload file limit. WordPress throws an exception saying “This file exceeds the maximum upload size for this site”, a similar can be seen in screenshot below.

Error increase upload media file size limit in WordPress

Error Media file size exceeds limit

For different web hosting like hostgator or bluehost , WordPress sets different upload file size limit depending upon the PHP configuration on server. For instance, hostgator sets the default limit to 64MB. But there are many more web hosting, which set default limit to only 2MB. In this article we will learn to increase upload media file size limit in wordpress.

How to increase file upload limit in wordpress?

  • Login to CPanel of your website hosting, for instance hostgator or bluehost etc…
  • Navigate to /public_html/wp-admin using the file manager.
  • In the wp-admin directory look for php.ini file and if found then right-click to edit php.ini file in text editor. But if not found, then create a new file and name it as “php.ini” and then open it in the code editor.
Edit increase upload media file size limit in WordPress

Edit Php.ini File

  • When you click the edit button, as in the screenshot above, it will open the php.ini file in text editor. If you have just created new a file php.ini file, then simply copy-paste the below code and save it.

upload_max_filesize = 32M
post_max_size = 32M

  • But if you have edited the already existing php.ini file then, search for “upload_max_filesize” line and change the numeric value to 32M, or as desired, 64M, 128M etc…
  • Click save button and close the file.
  • Now login to WordPress Admin panel and navigate to Media > Add new media.
  • Now you will notice the maximum upload file size has been increased to the value we just set in the php.ini file, just like in the screenshot below.
Increase upload media file size limit in WordPress

Upload Media Size Increased

  • Now you can upload your media with file size up to 32MB, but if you want to increase the limit then you again edit php.ini file and change its desired value.

I hope this tutorial was not that complex as it seemed initially, but all’s well, that ends well. If you have any query or any further assistance required, then you can post comments as your feedback.