How to Increase the Maximum File Upload Size in WordPress
How to Increase the Maximum File Upload Size in WordPress – Do you want to extend the maximum file upload size in WordPress? Sometimes file upload size limits can stop you from uploading files, compromise uploaders, or install plugins and themes. We’ll show you ways to increase the maximum file upload size to repair those issues during this article.
How to Check Your Maximum File Upload Size Limit in WordPress?
Your WordPress website automatically shows the maximum file upload size limit once you are uploading images or media. To see it, you’ll go to Media » Add New, and you’ll see the maximum file upload size limit for your WordPress site.
Following Are The Methods to Resolve This Error
1. Theme Functions File
There are cases where we’ve seen that just by adding the subsequent code within the theme’s functions.php file, and you can increase the upload 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
In this method, you’ll need to access your WordPress site’s root folder by using the FTP in your hosting account’s cPanel dashboard.
In most cases, if you’re on a shared host, then you’ll not see a php.ini in your directory. If you don’t see that file, create a file called php.ini and upload it to the root folder. And add the subsequent code in that file:
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
This method is reported to figure for several users. Remember if 64 doesn’t work, then try 10MB (sometimes that works).
3. .htaccess Method
Another method to resolve the issue is by using the .htaccess method. In this method, you need to modify the .htaccess file in your website’s root directory. Where you can increase the maximum upload size by editing the .htaccess file in your website’s root folder and add the subsequent 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
Again, we must emphasize that these techniques might not work if you’re on a shared hosting package. In this case, you’d need to contact your web hosting provider to extend the limit for you.
We hope this article is helpful for you to increase the maximum upload size. If you still facing the issue then contact WordPress Expert who can help you to resolve the issue at a reasonable price.