How to Increase the Maximum WordPress Upload Limit?
I had created many blogspot blogs and use them for learning basic HTML, CSS and theme customizations. Blogger platform is one of the best places for new learners and it’s free too. Users can customize almost everything of their blogspot blog if compared to the free .com wordpress blog. After learning some basic customizations, I choose WordPress to create a self-hosted website as it gives more flexibility, usability and user friendliness too. One more best thing is you can run WordPress on your computer without any internet connection for testing new things.
Yesterday when I tried to install a wordpress theme having size 3MB through wp dashboard. I got an error related to wordpress upload limit that is pre-configured in php.ini. In simple words; it was mean the current setting of wordpress maximum upload file size limit cannot handle the file that I was trying to upload.
By default in some web hosting and also in xampp 2mb is maximum upload limit in wordpress that is not enough to upload media files such as videos. It was not an unknown issue for me because I’ve faced this issue many times in the past. In such condition, I just upload files using FTP client to the wp-content directory and ignored this issue in the past.
You might also like:
But this time, I aimed to FIX this wordpress upload limit issue. I researched and found that I need to modify some default settings built-in comes with web hosting and also in xampp local server. I learned how to fix this and thought why not share this solution with my readers.
If you are facing this issues, then continue reading. In such situation, All you need to do is search for the php.ini file located in hosting root directory. If you are using xampp localhost server then it should be located in Xampp>php.
[Note: You can use both methods for increasing maximum wordpress file upload size for web hosting and Xampp local server]
How to increase the maximum WordPress file upload size limit?
I found some solutions to FIX this issue but recommend these two for fixing file upload limit in wordpress.
1# PHP.ini File Editing Method
To increase the maximum upload file size, you need to edit the php.ini configuration file. If you are using shared web hosting then login to cPanel and search for the php.ini file in the root directory of your hosting. Open it and search “upload_max_filesize“, “post_max_size” and increase the limit of maximum upload file size. If you don’t find any file named php.ini then create one by yourself and save it to wp-admin folder. Insert following lines in it.
If you want to increase the maximum execution time of each script then search and modify this syntax also. Script execution time works in seconds, so if you setup 300 it means five minutes. It’s a good practice to limit this time on productions servers in order to eliminate unexpectedly long running scripts.(As described in php.ini file)
This is one of the easiest ways to maximize wordpress upload limit and it will work like a charm, however if it does not work go ahead and try the second method.
2# By Editing .htaccess File
This is another method to increase wordpress upload limit. All you need to do adding below code in your .htaccess file located in the web hosting root directory. Go to hosting root directory and open the specific file(.htaccess) and insert code anywhere in the file outside of the blocks.
(Note: Before editing please download your current .htaccess file for backup purpose on your computer.)
Save your file and check whether upload file limit increased or not. I tried this method for Xampp and it work fine but when I tried in HostGator to increase the limit I received 500 Internal Server Error. However, default wordpress upload limit in HG is 64 MB. In most cases first method work like a charm.
If both methods not worked for you then it’s better to contact your web host and I am pretty sure they will fix it. I have used BlueHost and HostGator and never faced any issue of raising upload file size limit in wordpress, so I high recommend both of these hosts.
Have you ever face this wordpress upload limit issue? How did you fix it? I would like to hear your solutions.
Is there any other method that I missed in this article? Feel free to suggest me in the comments section below, I will update this article.