Skip to main content

Increase the upload_max_filesize in WordPress

Maximum File Upload Size

“The uploaded file exceeds the upload_max_filesize directive in php.ini” – Do you want to upload and install the WordPress plugins or WordPress themes but get this message?

In this article, we will show you how to easily increase the maximum file upload size in WordPress to fix those issues.

Maximum File Upload Size
Maximum File Upload Size

1: Increase upload_max_filesize via Theme Functions File

There are cases where we have seen that just by adding the following code in theme’s functions.php file, you can increase the upload size:

2. Create or Edit an existing PHP.INI file

For this method you will need to access your WordPress site’s root folder by using FTP or File Manager app in your hosting account’s cPanel dashboard.

In most cases if you are on a shared host, then you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini and upload it in the root folder. In that file add the following code:

This method is reported to work for many users. Remember if 64 doesn’t work, then try 10MB (sometimes that work).

3.Increase upload_max_filesize via htaccess Method

Some people have tried using the .htaccess method where by modifying the .htaccess file in the root directory, you can increase the maximum upload size in WordPress. Edit the .htaccess file in your WordPress site’s root folder and add the following code:

Important: If you are on a shared hosting package, then these techniques may not work. In that case, you would have to contact your web hosting provider to increase the limit for you.

We hope this article will be helpful for you!

Increase the upload_max_filesize in WordPress
5 (100%) 3 votes