How to increase the Default File Upload Size Limit in WordPress
Can’t upload your media file in WordPress? A common problem of bloggers when working with WordPress is when the media file size exceeds the upload limit size.The good news is just like you can increase the WordPress PHP memory limit, you can also change the file upload size limit as well.
WordPress install has a constraint on maximum file size for uploads. If you want to know what your site’s upload limit is, you can visit Media -> Add New. Below the upload box you will see “Maximum upload file size” with a number next to it, in megabytes.
Edit or create php.ini file
If you use cPanel, go to the Files section and click on the File Manager button. Make sure the checkbox for Show Hidden Files is checked and then click Go.
Select your wp-admin folder and find a file called php.ini. In most cases if you are on a shared host, you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini in your wp-admin folder.
Open the php.ini file add the following code:
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300
Change Theme functions file
This is the third method that will let you change the maximum upload file size limit. In this method, you have to make changes in theme functions. First of all, go to your WordPress dashboard and then Click on Appearance from the left bar. After that Click on Editor. Now you need to paste the following code in the functions.php.
@ini_set( ‘upload_max_size’ , ’64M’ ); @ini_set( ‘post_max_size’, ’64M’); @ini_set( ‘max_execution_time’, ‘
So you can see there is not just one solution for increasing the default upload size limit in WordPress. How you actually go about increasing the upload limit of your install depends on how your server is configured. If any of the solutions works, uploading large media files won’t be an issue anymore. These changes shouldn’t take more than a few minutes to take effect so you can quickly get back to work.
If none of the above solutions work for you, you can contact your web host. File uploading size setting is actually controlled by the hosting account. Tell them you want to increase the “memory_limit”, “upload_max_size” and “post_max_size” in your php.ini file. Generally, web hosting services don’t have a problem doing this.
Latest posts by Christine (see all)
- Top Affiliate Friendly Paid Traffic Sources for your Online Business 2017 - June 18, 2017
- Recommended 15 Free WordPress Plugins for Successful Blogging - December 18, 2016
- Why are Contextual Links Important For WordPress SEO - October 16, 2016