pda-8-effective-ways-to-increase-wordpress-upload-limit

8 Effective Ways to Increase WordPress Upload Limit

All along, WordPress has proven itself to be the best tool to develop an appealing website. It provides users with themes and plugins to build from an ecommerce store to a corporate network. Nevertheless, performance, security, and support are what you should consider when choosing a host for your WordPress site.

It would be annoying that your uploading is interrupted by the limited WordPress upload file size of 25MB. Such a situation causes the inability to continue uploading large files, plugins, and themes, which is an obstacle. Thus, it is essential to extend the maximum upload size in both your server and WordPress site.

There are plentiful methods to address the issue depending on your host and server. Let’s find out how to efficiently increase the WordPress upload limit with our article.

What is the WordPress Upload Limit?

Media files such as images, videos, audios, themes, and plugins are necessary for establishing a website. As mentioned above, when the upload size is set to minimum, it is a challenge to upload large files.

Most of the time, the WordPress upload file size limit fluctuates from 2 to 150MB. To prevent timeouts from happening, your host often sets the limit equal to the server level.

How to Increase the Maximum Upload Size in WordPress

First, you have to check the maximum upload size of your WordPress site. You will encounter the upload size limit the moment you try to upload any media files. All you need is to navigate to WordPress admin dashboard > Media > Add New there it is.

pda-check-increase-wordpress-upload-limit

Then, follow the instructions below to increase the WordPress upload limit.

#1 Contact Your Hosting Provider

Reaching out to your hosting provider should be your first method due to its simplicity. Since it’s easy to increase the upload limit, most hosting providers will help you fix the issue. Also, meddling with the server or your site without knowledge may cause negative consequences.

#2 Update Your .htaccess File

The .htaccess file which is located in the root directory of your site, controls the web server. Make sure to enable the “hidden files” display or you won’t be able to locate the file. Add the code below to its bottom, customize the number as your will once you find the file:

php_value upload_max_filesize 60M
php_value post_max_size 60M
php_value memory_limit 15M

#3 Customize the php.ini File

The php.ini file is also located in the root directory of your site. It can only be accessed through FTP, cPanel, and WordPress plugin. The php.ini file lets you set up your web host and customize your upload limit by adding these codes:

upload_max_filesize = 12M
post_max_size = 13M
memory_limit = 15M

If you can’t locate the settings of the php.ini file, copy and paste the code at the file’s bottom. In case you can’t find the file, create one for yourself.

#4 Modify the .user.ini File

Unless your web host has not locked the global PHP configuration down, they may have set the server to operate with .user.ini files instead of php.ini files. Similar to php.ini and .htaccess files, the .user.ini file is in the root directory of your site. You can create a new .user.ini file if you can’t locate it.

Once located, add these codes below to your .user.ini file:

upload_max_filesize = 32M
post_max_size = 64M
memory_limit = 128M

#5 Change PHP Options through cPanel

If your web host manages your server and site by cPanel, you can configure your upload limit on its interface. To initiate, choose the Select PHP Version in Software of your cPanel dashboard.

pda-select-php-version-cpanel

You are able to change the Current PHP version and enable or disable PHP Extensions of your server. Hit the Options link to navigate to the PHP Options panel.

pda-php-options-cpanel

Move down the page to customize the values of PHP directives such as upload_max_filesize, post_max_size, memory_limit, max_execution_time, and max_input_time.

pda-increase-wordpress-upload-limit-cpanel

We recommend you contact your web host if you have any questions about the values. In case you’re using an old version, remember to hit Save Changes because the newer version automatically saves your settings.

#6 Use the upload_size_limit Filter

The upload_size_limit filter, of course, filters the maximum upload size in the php.ini file. You can also see the max upload size allowed in the Media Library and Site Health Info.

The code below defines the upload limit for all non-admin users. Nevertheless, you can modify the code to fit your specific roles.

/**
* Filter the upload size limit for non-administrators.
*
* @param string $size Upload size limit (in bytes).
* @return int (maybe) Filtered size limit.
*/

function filter_site_upload_size_limit( $size ) {
// Set the upload size limit to 10 MB for users lacking the 'manage_options' capability.
if ( ! current_user_can( 'manage_options' ) ) {
// 10 MB.
$size = 1024 * 10000;
}

return $size;
}

add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', 20 );

#7 Activate a WordPress Plugin

Developers always have a plugin to solve your problem and increasing the WordPress upload limit is not an exception. That one plugin that we would like to present to you today is Increase Maximum Upload File Size.

Once the plugin is activated, navigate to its settings and enter the desired size for your new upload size. Enter the value and that’s it! You have just increased the WordPress upload size limit.

pda-increase-wordpress-upload-limit-plugin

#8 Increase Upload File Size in Multisite

You can increase the upload limit from the settings if you are operating WordPress multisite.

However, the increase depends on your server configuration. If 20MB is the server setting, you cannot extend the upload file size above that. When your network is set to 15 MB out of the server’s 20MB, you can increase the upload size to 20MB.

pda-increase-wordpress-max-upload-file-size

Bonus: Protect Your WordPress Upload Files

After fixing your upload limit problem, file protection should be your top concern. Coming up next, we have a dynamic duo of security plugins that will handle your worries with care – PDA Gold and PPWP Pro. Check them out! .

Prevent Direct Access Gold (PDA Gold) prevents Google from indexing your files so it won’t be exposed to anyone. If someone tries to illegally access your files, they will encounter a 404 error page. Moreover, PDA Gold blocks hotlinking, which saves your bandwidth and makes your site operate smoothly.

There is no better plugin in the password protection aspect than the PPWP Pro. The plugin password protects your WordPress files, posts, pages, partial content, WooCommerce products, or even your whole website. PPWP Pro enables you to create a single password for multiple content or secure a single content with multiple passwords.

Feel Free to Upload Your Files from Now

To summarize, the limited WordPress upload file size is an annoying yet easy obstacle to overcome. With our solutions, what else is stopping you from freely uploading large files for the sake of your site development? Nonetheless, we suggest you take every step carefully since you are interacting with the root files.

Do you find this article helpful? Is there any solution that we need to consider? Please let us know in the comment section below.

Leave a Reply

Your email address will not be published. Required fields are marked *