Do you want to increase the maximum file upload size in WordPress?
Sometimes a low file upload size limit can stop you from uploading files with the media uploader or installing larger WordPress plugins and themes.
In this article, we will show you how to easily increase the maximum file upload size in WordPress to fix those issues.
Why Increase the Maximum File Upload Size in WordPress?
For most WordPress website owners, this limit will be more than enough.
However, there are times when you’ll need to raise this limit so you don’t run into upload errors.
- You run a photography website and need to upload large images.
- Your design or photography portfolio has large images.
- You want to install a larger WordPress theme or plugin.
- You want to sell digital products like eBooks, photos, videos, and more.
- You regularly update content and add audio, photos, and more that are beyond the current limit.
That being said, let’s show you how you can increase the maximum file upload size on your WordPress site.
Since most users have different WordPress hosting setups, we will cover the following:
- How to Check Your Maximum File Upload Size Limit in WordPress
- Method 1: Contact Your WordPress Hosting Provider
- Method 2: Create or Edit an Existing php.ini file
- Method 3: Add Code to Your WordPress Theme functions.php File
- Method 4: Add Code to Your .htaccess File
- Method 5: Use a WordPress Plugin to Increase File Upload Size
If you’d prefer written instructions, then just keep reading.
How to Check Your Maximum File Upload Size Limit in WordPress
WordPress will automatically show the maximum file upload size limit when you are uploading images or other media.
To check this, simply go to Media » Add New in your WordPress admin panel, and you will see the maximum file upload size limit for your WordPress site.
Now that you know how to find the size limit, let’s show you how to increase the maximum upload size in WordPress.
Method 1: Contact Your WordPress Hosting Provider
One of the easiest ways to increase the maximum file upload size in WordPress is to reach out to your WordPress hosting provider.
This is a relatively simple task for their customer service team and can be done in a couple of minutes.
For beginners, this can be much easier than adding code to WordPress and editing server files.
Simply head over to your hosting provider website, like Bluehost, and click the ‘Chat’ tab.
Then, enter your account details and fill out a support request asking to increase the file upload size on your WordPress site.
You can also reach out to support from within your hosting account dashboard.
Method 2: Create or Edit an Existing php.ini file
Another way to increase the maximum file upload size is by creating or editing a file called php.ini. This file controls a lot of settings for your WordPress hosting environment.
Most WordPress hosting providers like Bluehost have a beginner-friendly cPanel to help manage your website.
If your web host has a cPanel dashboard, then you can increase the file upload size through the built-in tools.
Note: The following is from the Bluehost cPanel. However, most shared hosting providers will have similar steps.
To do this, log in to your WordPress hosting account dashboard and go to the ‘Software’ section.
Then, click on ‘MultiPHP INI Editor’.
Next, scroll down to the section labeled ‘upload_max_filesize’ and enter a new maximum filesize into the box.
Then, click the ‘Apply’ button.
Alternatively, you can click the ‘Editor Mode’ menu tab, and then you can change the maximum file upload size directly in the editor.
You need to edit the ‘upload_max_filesize’ section to increase your file upload size.
Once you are finished, just click the ‘Save’ button.
Edit php.ini by Adding Code
If your current hosting provider doesn’t offer the cPanel option, then you’ll need to edit this file manually.
To do this, you can use an FTP client or the file manager option in your WordPress hosting control panel.
If you are using shared hosting, then you might not see the php.ini file in your hosting directory. If you don’t see one, then simply create a file named php.ini and upload it to your root folder.
Then, add the following code snippet to the file:
upload_max_filesize = 256M post_max_size = 256M max_execution_time = 300
You can modify the ‘256M’ limit to the file size you need for your WordPress blog.
Method 3: Add Code to Your WordPress Theme functions.php File
Instead of editing the file directly, we recommend using WPCode. It’s the best code snippets plugin that allows you to add code to your website without breaking your website.
If you haven’t done this before, then see our beginner’s guide on how to add custom code in WordPress.
Upon activation, you should navigate to Code Snippets » + Add Snippet. You will need to hover your mouse over the ‘Add Your Custom Code’ option and then click the ‘Use snippet’ button.
On the next screen, you need to give your new snippet a name and change the code type to ‘PHP Snippet’.
Then you can copy and paste the following code snippet under ‘Code Preview’. Make sure you change ‘256M’ to the maximum file size you need:
@ini_set( 'upload_max_size' , '256M' ); @ini_set( 'post_max_size', '256M'); @ini_set( 'max_execution_time', '300' );
Finally, switch the toggle at the top to ‘Active’ and then click the ‘Save Snippet’ button. The code will now be executed on your website.
Method 4: Add Code to Your .htaccess File
Another way to increase the maximum file size is by modifying the .htaccess file. This file controls the high-level configuration settings for your website.
To do this, you need to log in to your website server via FTP. If you haven’t done this before, then see our guide on how to use FTP to upload files to WordPress for beginners.
After that, you need to locate your .htaccess file in your website’s root folder.
If you can’t find your .htaccess file, then it could be hidden by your file manager or FTP client. To learn more, see our guide on why you can’t find the .htaccess file on your WordPress site.
Next, you need to add the following code snippet to your .htaccess file:
php_value upload_max_filesize 256M php_value post_max_size 256M php_value max_execution_time 300 php_value max_input_time 300
To increase your maximum file upload size even more, simply change the ’64M’ to the size you require.
Method 5: Use a WordPress Plugin to Increase File Upload Size
Another way you can increase the maximum file upload limit is by using the WP Increase Upload Filesize plugin. If you are not comfortable adding code to WordPress, then this could be a good option for you.
The first thing you need to do is install and activate the plugin. For more details, see our guide on how to install a WordPress plugin.
Upon activation, navigate to Media » Increase Upload Limit in your WordPress admin panel.
This brings you to a screen where you can select a new file upload size in the ‘Choose Maximum Upload File Size’ drop-down.
Then, click the ‘Save Changes’ button.
Note: The maximum file upload size will be set by your hosting provider. If you need a file size limit that’s larger than the one listed in the drop-down, then you need to contact your hosting provider and ask to increase the limit.
We hope this article helped you increase the maximum file upload size in WordPress. You may also want to see our guide on how to choose the best website builder and our expert picks of the best virtual business phone number apps with free options.