Are you searching for How to Increase the Maximum File Upload Size in WordPress? The default maximum upload file size depends on your hosting provider. By default hosting provider sets the maximum upload file size. If your file size exceeds the host’s default file size limit then you may see an error message “the uploaded file exceeds the upload_max_filesize directive in php.ini” or ‘your file name’ exceeds the maximum upload size for this site.
Well, there are some fixes available to overcome this maximum file upload size issue for your WordPress website.
In this article, we will show you some of the totally different techniques that you can use to increase the maximum file upload file size for your WordPress Website.
Many of these techniques may be required to add some code snippets to your website. Also some cases you need to log into your hosting account or cPanel.
For the kind of information if you are not able to add code snippets then also we will show you an easy method to increase the maximum upload file size for your WordPress website. In the easy method, we will describe how you can increase the maximum file upload size in WordPress with a simple Plugin.
For those who are trying to upload large media files or install big plugins, then the maximum hosting servers show an error message while performing these tasks. It is a common issue. By the way, don’t worry about it, there are various solutions available.
In this article, we will show you seven different solutions for changing the maximum upload file size limit in your WordPress website. These methods are really so easy.
To solve the maximum upload file size we will describe several methods. Basically, we will be working with three settings on different files(basically PHP file or .htaccess file). Let us explain these three settings first in order that you acknowledge what you need to actually do:
This defines the maximum file upload limitations.
This defines the maximum file upload limitation that might be handled in a POST request while publishing blog posts.
This defines how much memory is allocated for PHP. This quantity needs to be equal to or larger than the upload_max_filesize.
For example, You want to upload a file with the file size of 50MB then you need to set the upload_max_filesize to 64M, post_max_filesize to 64M, and memory_limit to 64MB
Note: Please take a full backup of your website before making any changes. Basically, some hosting providers, particularly shared hosts, may not allow you to modify the maximum file upload limit. As such, a few of these techniques are listed below may not perfectly work for your website. If you found any issue then try a different one.
However, You still have a safe option to overcome this issue by asking your web hosting service provider for help. We use HostGator web hosting, and they are really awesome. They have many more experienced support team members to solve your problem instantly.
How to Check the Maximum File Upload Size Limit in WordPress?
By default, WordPress will show the maximum upload file size limit inside the admin panel while uploading images/pictures or media files. To check it, you possibly can go to the Media » Add New page and you will notice the maximum upload file size limitations for your WordPress website.
Please see the screenshot is given below.
How to Increase the Maximum File Upload Size in WordPress?
In this article, we are going to show you how to increase the maximum file upload size in WordPress. Well, before getting started we want to let you know that whether or not some of these methods won’t be suitable for your hosting server.
However, we are able to say that many of these techniques are work for most WordPress customers and web hosting configurations. Hope all the techniques will work perfectly. You can use any one method.
So, let’s get started to apply methods on bye one and see the results!
Method 1: Change PHP Options on cPanel
Well, First of all, to change your server PHP options you need to login into your cPanel account. and then you will find “Select PHP Versions” under the Software tab. Or you can search with the keyword “Select PHP Version”. Then you will find it. You need to click over “Select PHP Version” after then go to the “Options” Tab. On the PHP Options page, you will see some PHP settings.
To overcome maximum upload file size limitations you need to change 3 different PHP settings on this page.
Let’s follow these steps to increase the maximum upload file size in WordPress:
- Login into your cPanel account
- Find out or search “Select PHP Version”. You will find it under the Software tab. And then click over “Select PHP Version”
- By default the system will display PHP “Extensions” settings, You need to go to the “Options” tab then you will see some settings on the PHP Options tab.
- Set the “memory_limit” to 256M or greater,
- Then Set “post_max_size” to 256M or greater and
- Set “upload_max_filesize” to 256M or greater
That’s it, all the settings will be saved automatically. Awesome, If you follow these steps then I can ensure your problem has already been solved.
To make it easy we create a video tutorial for you. Watch this video to change these PHP settings properly.
Method 2: Adding Code Snippet Inside Funtions.php File
You need to copy and paste a simple code into the “functions.php” file, which file is included in all WordPress themes.
Access functions.php file from WordPress Admin Dashboard:
At first log in to your WordPress admin panel. Then find and click on Appearance » Theme Editor on the left sidebar. After then check, Is this page open with your currently active theme or not. On the right side, you will see a list of PHP files and theme folders. Then find out the “functions.php” file and click over that file. Scroll down and add the below code snippet to the bottom of the file.
Access functions.php file from cPanel > File Manager:
Other ways you can get access or edit functions.php file from your web server file manager. On your file manager find your domain or go to inside public_html file(if your hosting primary domain is that current domain). And then go to wp-content » themes » “your active theme” » functions.php, Then open the functions.php file as edit mode and scroll down to the bottom of the page. And then add the below code snippet to the bottom of the file.
@ini_set( 'upload_max_size' , '256M' ); @ini_set( 'post_max_size', '256M'); @ini_set( 'max_execution_time', '300' );
*Note: If the functions.php file ends with “?>” syntax then you must add the above code snippet before that PHP syntax.
Method 3: Create or Edit an existing PHP.INI file
The php.ini file controls most of the settings in your web host. By including just a few lines of code snippet in it, you’ll be able to change the file upload limitations.
For this technique, you will have to enter your WordPress website’s root folder by utilizing your hosting server cPanel » Filemanager app or FTP in your web hosting account’s cPanel.
Normally, If you use shared web hosting for your WordPress website then the php.ini file won’t be visible inside the domain root directory. Don’t worry, If the file isn’t visible to you then simply create a new file with the name (php) and file extension (.ini). Just like “php.ini”. And then add the below code snippet inside that file. If you are using FTP then upload that file inside the domain main root directory.
upload_max_filesize = 256M post_max_size = 256M max_execution_time = 300
This technique will work on most web servers. But in case it does not work then try to use 64M or 10M instead of 256M
Method 4: Update .htaccess File
A .htaccess file is a special dot file that controls the web hosting server. Every hosting server supports a .htaccess file. It can be able to overwrite the php.ini file. As a result, if you set PHP max upload value inside the .htaccess file then it will overwrite php.ini rolls.
Once you have successfully installed WordPress CMS then it automatically creates a .htaccess file on the root directory. But most of the web servers make this type of dotfiles hidden. To get visible or edit access you need to change your hosting server settings. Simple you need to a checkmark on the server settings “Display hidden files”.
Please see the screenshot below and do it by yourself.
If you have done it properly then the file .htacces will be visible to you and also you can be able to edit this file.
Simply open the .htacces file in edit mode and update the bellow code snippet bottom of the file.
php_value upload_max_filesize 256M php_value post_max_size 256M php_value memory_limit 256M
That’s it, you are all done. You can change the value as you need.
Method 5: wp-config.php
This technique is just like the previous two methods. In this method, we will modify and update the wp-config.php file, which is located within the root directory of your website.
Simply open the wp-config.php file in edit mode and add the below code snippet to the bottom of the file.
@ini_set( 'upload_max_size' , '256M' ); @ini_set( 'post_max_size', '256M'); @ini_set( 'memory_limit', '256M' );
You can change the value to 64M or higher that suits your needs!
Method 6: Using a Plugin
The simplest solution to increase your website’s maximum upload file size limit is to install a simple WordPress plugin. There are various WordPress plugins available.
We recommend the list of following WordPress plugins:
- Increase Maximum Upload File Size by imagify
- Tuxedo Big File Uploads
- WP Increase Upload Filesize
- Upload Larger Plugins
Simply install any one WordPress plugin from the list above, then activate it, and comply with the directions.
Method 7: For Multisite WordPress
If your WordPress is running a multisite installation, you possibly can simply change it within the Network settings.
Go to My Sites > Network Admin > Settings. Scroll down to the bottom of the page and change the value for “Max upload file size”.
Method 8: Contact Your Host
For those who are not able to follow the above-described methods then just simply contact your hosting provider. Surely they can be able to change the maximum upload file size limit quickly.
We are using HostGator web hosting. I can ensure you their help support team is really awesome. They will help you with it within a few minutes. For those who didn’t purchase web hosting yet or want to change hosting provider then check out some of our recommended best web hosting providers.
In the final words, we can let you know that in some cases these strategies won’t work if you are using shared web hosting. But don’t worry you still can use the last method(Contact with your hosting provider). Surely this will work for everyone.
We hope this article helped you to increase the maximum file upload size in WordPress. In case you are still having issues, then simply comment with your issue or CLICK HERE to get free support from our expert developer. We will be happy to help you.
Which method is right for you? Which one was the best and easy to do? The hardest? Write us your feedback in the comments box! Thank you.
If you like this article and want to support us, then please subscribe to our YouTube Channel (WpFresher – WordPress Tutorials) for many more WordPress video tutorials. You may also find us on Facebook & Twitter.
You May Also Read Our Recently Published Articles:
- Why Do You Need a CDN for Your WordPress Website?
- How to Increase Google AdSense Earnings | 5 Easy Ways
- Google AdSense Eligibility Checker Tool – Check Your AdSense Status
- 7 Essential Elements For A Successful eCommerce Website
- How To Add Breadcrumbs To The League WordPress Theme
Our Small Request, Please, Subscribe to Us!
We will send you notifications for every new blog post. You can unsubscribe at any time.