Would you like WordPress to allow larger file uploads?
Installing larger WordPress plugins and themes or uploading files using the media uploader may occasionally be prevented by a low file upload size limit.
To resolve those problems, we’ll walk you through the process of raising WordPress’s maximum file upload size in this post.
Table of Contents
Why Increase the Maximum File Upload Size in WordPress?
When you install WordPress and join up, your WordPress hosting provider will establish a default maximum file upload size. This limit is set by your hosting provider and often varies from 2MB to 500MB.
This amount will more than suffice for the majority of proprietors of WordPress websites.
You may occasionally need to increase this limit, nevertheless, in order to avoid upload issues.
For example:
- 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.
Having said that, let me demonstrate how to raise the WordPress site’s maximum file upload size.
Note:Remember that having a lot of huge files on your website can cause significant performance and speed issues. For this reason, we usually advise against ever uploading movies to WordPress.
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
How to Check Your Maximum File Upload Size Limit in WordPress
When you upload images or other media, WordPress will automatically display the maximum file upload size limit.
To verify this, just navigate to Media » Add New in your WordPress admin panel. Here, you will find the WordPress site’s maximum file upload size restriction.
Now that you are aware of the size limit, let us demonstrate how to raise WordPress’ maximum upload size.
Method 1: Contact Your WordPress Hosting Provider
Getting in touch with your WordPress hosting provider is one of the simplest ways to raise the WordPress maximum file upload size.
Their customer support personnel can complete this pretty easy activity in a few minutes.
Compared to changing server files and adding code to WordPress, this might be far simpler for newcomers.
Just visit the website of your hosting company, such as Bluehost, and log in.
Next, select the ‘Chat’ icon located at the lower part of the screen. Next, you can request that the support team expand the file upload limit on your WordPress website.
You can also reach out to support from within your hosting account dashboard.
Method 2: Create or Edit an Existing php.ini file
Making changes to the php.ini file is another method to raise the maximum file upload size. Numerous settings for your WordPress hosting environment are managed by this file.
The majority of WordPress hosting companies, such as Bluehost, offer an easy-to-use cPanel to assist with website management.
You can use the integrated features in the cPanel dashboard of your web host to raise the file upload size.
Note: Bluehost’s cPanel provided the information below. But most shared hosting companies will follow a similar procedure.
*In Bluehost, the Hosting tab has a cPanel button at the bottom.
*Clicking this button will open your cPanel dashboard.
*Now you need to scroll down to the Software section and 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
1.upload_max_filesize = 256M
2.post_max_size = 256M
3.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
Using this method, you will add code to your WordPress theme’s functions.php file.
We advise utilising WPCode rather than manually altering the file. This plugin is the greatest for adding code snippets to your website without causing any issues.
If this is something you’ve never done before, check out our tutorial on adding custom code to WordPress for beginners.
You must install the free WPCode plugin first. See our detailed instructions on installing a WordPress plugin for more information.
You should go to Code Snippets » + Add Snippet after activation. To utilise the “Use snippet” button, move your mouse over the “Add Your Custom Code” option.
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
Making changes to the.htaccess file is another method for raising the maximum file size. Your website’s high-level configuration settings are managed by this file.
You must use FTP to access your website server in order to accomplish this. See our beginner’s guide on using FTP to upload files to WordPress if you haven’t done this before.
The next step is to find your.htaccess file in the root folder of your website.
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
Using the WP Increase Upload Filesize plugin is another option to raise the maximum file upload limit. This can be a suitable choice for you if you feel uneasy writing code to WordPress.
The plugin needs to be installed and activated first. See our instructions on installing a WordPress plugin for further information.
After activation, go to your WordPress admin panel and select Media » Increase Upload Limit.
This opens a new window with the option to change the file upload size using the “Choose Maximum Upload File Size” drop-down menu.
Next, select “Save Changes” from the menu.
Note:Your hosting provider will establish the maximum file upload size. You must get in touch with your hosting company and request an increase in the file size limit if you require one that is greater than the one specified in the drop-down menu.
We sincerely hope that this post has assisted you in raising WordPress’ maximum file upload size. You might also want to check out our recommendations for the best virtual business phone number apps with free alternatives, as well as our advice on how to select the best website builder.