A WordPress file upload size limit may be preventing you from uploading larger files, plugins, and even themes to your WordPress website.
In order to fix this, you can increase the maximum upload size limit in your WordPress.
This guide will show you how to increase the how to increase upload size in WordPress.
Check your WordPress upload size
First, let’s learn how to check your WordPress upload size.
There are three easy ways to check your WordPress max upload size.
Media
In WordPress, select Media from the left hand menu and click on Add New.
Look for Maximum upload file size field.
Your WordPress max upload size will be indicated next to the Maximum upload file size field.
Site Health (Media Handling)
In WordPress, select Tools from the left hand menu and click on Site Health.
From the tabs at the top, select Info.
Under Info, click on the Media Handling section.
From the Media Handling list, look for the Max size of an uploaded file field.
Your WordPress max file upload size will be indicated next to Max size of an uploaded file field.
Site Health (Server)
On the Info tab under Site Health, click on the Server dropdown.
From the Server list, look for the Upload max filesize field.
Your WordPress max upload size will be indicated next to Upload max filesize field.
Why should you increase the upload file size in WordPress?
The default WordPress max upload file size is normally determined by your hosting provider and will be set anywhere from 2 MB to 128 MB.
That upload size works for most WordPress websites, however, depending on the needs of your website, you may require a higher limit.
Let’s look into some common reasons to increase the max file upload size in WordPress:
- You have video content that you want to upload
An increase in the max upload file size will allow you to increase the quality of your videos and increase their duration.
- You have a lot of media files to upload
Increasing the max upload file size will increase the number of media files that you can store on your WordPress website.
- Your plugins and themes are larger in size and need more space to be uploaded
Increasing the max upload file size in WordPress is a common requirement for larger sized plugins and themes.
Let’s now look into some full proof methods to increase to increase the maximum upload size in WordPress.
Edit your .htaccess file
The .htaccess file found in your root directory (public_html) is can increase the WordPress file upload size.
Your root directory, i.e., public_html, is where your main WordPress website files are located at your web hosting provider.
Go to your public_html folder and find the .htaccess file. If you don’t see your .htaccess in public_html right away, enable ‘show hidden files’ and it will appear.
Inside of your .htaccess file, put in the following code snippet:
upload_max_filesize = 32M
post_max_size = 64M
memory_limit = 128M
You can change the values depending on your requirements. The above code shows that you are changing the max upload file size to 32 MB*, increasing the post_max_size by 64 MB and increasing the memory_limit to 128 MB. These specs will cover most upload size requirements.
*Important: Make sure to put your MB values in M and GB values in G inside of your .htaccess file or any other WordPress website file. This is how PHP handles size directives.
Update your PHP options
Normally, all web hosting providers will give you access to a web management platform, typically it’ll be cPanel or their own custom web dashboard.
On your web management platform, you will see a tool (if enabled) to control your PHP settings. You can update your WordPress max upload size inside in the PHP tool.
Inside of your hosting control panel, look for the PHP selector tool, in cPanel, this is called Select PHP version.
From the top, click on the Options tab.
Look for the upload_max_filesize field, click on the dropdown and set your new limit.
Most hosting providers will let you set a max of 512 M (MB) or 1 G (GB).
Create a php.ini file
Go back to your root directory, public_html. Remember, your main WordPress website (i.e. WordPress website linked to your primary domain name) is located in the public_html main directory.
If you are increasing the WordPress max upload size on a different WordPress website, you will need to go to the subdirectory of that website, located in the correct subfolder within public_html.
Inside of public_html, click create new file.
Call your file ‘php.ini’ – a php.ini file is a file that allows you to increase your WordPress PHP configuration without having to modify your hosting control panel settings.
Inside of the php.ini file, put in this code snippet:
upload_max_filesize = 32M
post_max_size = 64M
memory_limit = 128M
his will increase your WordPress max upload size to 32 MB.
Update your theme functions.php file
Your theme functions.php file is a file that allows you to increase WordPress max upload size.
To edit your theme functions.php file, verify which theme you are using in WordPress first.
In your WordPress dashboard, click on Appearance, then Themes. Your active theme will be first on the list with an Active banner on it.
Next, go to your public_html directory (or subdirectory) and click on the wp-content folder.
From the wp-content folder, click on the themes folder.
Inside the themes folder, find your active theme’s name.
Once in your theme’s folder, scroll down and locate the functions.php file.
Put in the following code snippet:
@ini_set( 'upload_max_size' , '32M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '128' );
his will increase your WordPress max upload size to 32 MB.
Create a user.ini file
Similar to the php.ini file, you can create a user.ini to increase your file upload size in WordPress.
In your public_html directory, click create new file and name your file user.ini.
Inside of the user.ini file, put in the following code snippet:
upload_max_filesize = 32M
post_max_size = 64M
memory_limit = 128M
This will increase your WordPress max upload size to 32 MB.
Use a WordPress plugin
If you’re not comfortable with adding code snippets or modifying PHP settings, you can use a WordPress plugin to increase WordPress max upload size.
The WP Increase Upload Filesize plugin, aptly named, does exactly as it says.
To increase your WordPress max upload size using the WP Increase Upload Filesize plugin, follow these steps:
Go to your WordPress dashboard.
From your WordPress dashboard, click on Plugins and then Add New.
Search for WP Maximum Upload Size.
Install and activate the WP Increase Upload Filesize plugin from inside of your WordPress dashboard.
Once installed and activated, click on Wp upload limit from your WordPress dashboard menu.
In the settings, increase your max upload size to increase WordPress max upload size. Click save changes.
You’ll only be able to increase the max upload size to the maximum your hosting provider allows with the WP Maximum Upload Size plugin.
Ask your hosting provider
If you require special or higher than normal setting for your WordPress max upload size, you can ask your hosting provider to increase it for you.
Depending on your hosting provider and your hosting subscription, they will either increase it for you or require an upgrade to get access to a higher allocation of server resources.
We hope this article showed you how to increase the maximum upload size in WordPress effectively.
As you can see, it is quite easy to do, even for beginners.
Did you increase your upload size in WordPress? Let us know how it went in the comments!