Sometimes we encounter in WordPress with maximum upload file size error. This is caused due to low file upload size limit configuration in the website which stops the file uploading. In this article, we will show you how you can increase the file upload size in WordPress.
How to Check Your Maximum File Upload Size Limit in WordPress?
Once you try to upload some file, plugin, or theme in WordPress it will show you an error if the uploading file size limit on the website is smaller than the file you are uploading to WordPress. To check it, you can log in to WordPress and go to Media » Add New page and check the Maximum upload file size limit.
Following are the ways you can tackle Maximum Upload File Size error
1: Theme Functions File
You can add below code in function.php file to Increase the Maximum Upload File Size
@ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '64M'); @ini_set( 'max_execution_time', '300' );
2. Create or Edit an existing Php.ini file
You need WordPress site’s root folder access in either via using FTP, file manager, or Cpanel in order to make changes in php.ini file. If there is already a php.ini file then add the below code in that otherwise create a new php.ini file in the root and add the following code.
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
3. htaccess Method
You can increase the upload file size in making changes in .htaccess file which located in the root directory. Edit the .htaccess file and add the following code.
php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300
4. Using Plugin
You can use WordPress plugin to do the same just google “Increase Maximum Upload File Size” you will get related plugins.
If you are using shared hosting these things may not work for you, So then you have to contact your hosting provider to increase the limit for your website.
We hope this article helped you increase the maximum file upload size in WordPress. If you are still having issue please comment below.