Hello friends, Are you looking for a way to increase maximum upload file size in WordPress from 2 MB to 64 MB? Some times low file upload size limits can stop you from uploading files via media uploader, or install plugins and themes.
WordPress comes with its own media uploader. It makes uploading files to a blog an easy task – there is no need to deal with FTP clients or File Managers.
In WordPress, when you try to upload a bigger size media file, you get a message “file exceeds the maximum upload size for this site“.
The error can be very frustrating. Many hosts keep this limit low by default.
So in this post, we will dig into the root of the problem and provide you with some quick ways to resolve this issue and get back to uploading your files.
What you’ll need
Before you begin this guide you’ll need the following:
- Access to hosting control panel
- Access to WordPress administrator dashboard
How to Increase Media File Maximum Upload Size in WordPress?
There are many different ways you can change the upload limit in WordPress. We will show you different methods and you can apply any of them that you are comfortable with.
Method 1, Edit Your .htaccess File
To increase WordPress upload limit, log into your web hosting cPanel account and go to the root directory where your WordPress is installed.
Open up the .htaccess file and add the following code at the end.
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 300
php_value max_input_time 300
Once added, don’t forget to save the file.
Now go to your WordPress dashboard Media> Add New and check whether the upload limit is changed.
Method 2, Create or Modify php.ini File
If the above .htaccess solution didn’t increase WordPress upload limit, then you need to apply this php.ini method.
Go to your hosting cPanel account and go to the root folder. Find the php.ini file. If there is no php.ini file, simply create a new one.
Edit the php.ini file and add the following lines.
memory_limit = 256M
post_max_size = 256M
upload_max_filesize = 256M
Once done, save the file.
Now recheck your maximum upload file size by going to Media> Add New.
Method 3, Theme Functions File
There are cases where we have seen that just by adding the following code in the theme’s functions.php file, you can increase the upload size:
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
As you can see, increasing the WordPress maximum upload file size isn’t too complex, it’s just a matter of knowing where to look and which commands to use.
In this tutorial, we have covered 3 different ways to change the WordPress File upload limit. What solution worked for you? Do let us know in the comment section.
You May Also Like
- Best WordPress Image Compression Plugins Compared
- Best Rich Snippets Plugins for WordPress 2019
- WordPress Ping List for Faster Indexing Of New Post in WordPress
Get over 63% off on Bluehost packages and a free domain of your choice. View this Deal »