Do you want to increase your WordPress file upload limit? But we sometimes encounter this problem when we go to install large themes and plugins. In this article I will show you how to increase the file upload limit of WordPress. Keep in mind that shared hosting may not work. For this you have to increase the upload size by contacting the hosting provider.
Most of the time in WordPress, the maximum upload size is set to 2 MB or something like that. Then we can’t upload files even if we want files larger than 2 MB. In that case we have to manually upload the file to cPanel and synchronize it again from WordPress. This is a simple process.
Also, if we reduce the Maximum Execution Time, we have a problem to run any big heavy theme. Shows an error or warning when running a backup or any time lengthening process.
So today we will see how to increase the maximum file upload size for PHP and execution time of WordPress.
Change the maximum upload file size for PHP & WordPress
We will show all the available methods in this tutorial. You should try step by step and see which one works for you best. Any one will definitely work for you. So, let’s talk in details about increasing uploading file size for PHP and WordPress.
Method 1 – Theme Function File
From the theme function file. First you need to move from your website’s cPanel file manager to the theme directory. From there you need to edit the functions.php file.
Go to Edit and add add this 3 line code at the end of the file.
You need to save the file with. Now go to the media library and see if the upload size has increased. If it increases, then there is no need to do anything else. If not, then follow the next method.
Method 2 – php.ini
Check whether the php.ini file is in the public_html folder in cPanel’s file manager. If not, you have to show the hidden file. However, if it is not available, you need to create a file called php.ini. And you have to add this 3 line code to that file.
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
If you want, you can give more than 64 MB. Execution time can be more than 300 seconds (5 minutes). If this method does not work, then follow the next method.
Method 3 – .htaccess
You can increase the upload limit in WordPress by modifying the .htaccess file in the root directory using the .htaccess method. Add the following code to the .htaccess file in the main folder of your WordPress site. Show the hidden file from cPanel, find the .htaccess file and attach these codes to it very carefully. Keep a backup of the file first for safety.
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
Hope it will work for you. If that doesn’t work again, follow the next method.
Method 4 – cPanel
Select PHP Version from cPanel and click on Options. From there max_execution_time and post_max_size and upload_max_filesize should be increased. Keep in mind if 64 MB doesn’t work then try with 10MB a lot of times it works well.
If this does not work, then you have to follow the next available method.
Method 5 – Hosting Provider
Talk to your hosting provider to increase the upload file size in WordPress. If they are expert enough, they will give you solution. Otherwise, you can hire an expert from Speed Host to see if there is a problem anywhere else on your site. You can also buy the best speedy hosting from us to get reliable service for your website.
Hope the strategies will solve the issues of upload file size in WordPress and PHP. Let me remind you once again, these strategies may not work if you use shared hosting packages. In that case you need to contact your web hosting provider to increase your limit. Hopefully, this article will help you increase the size of file uploads in WordPress and php. If you liked this article, please share it on the social media. For any hosting support, you can contact our team in Bangladesh. We are dedicated to solve hosting issues. Thanks.