How to increase upload file size limit in WordPress

Some host set the default upload size for WordPress to 2MB which is extremely low. This can cause an error when you try to upload files that are larger than this size. The error would see would be something like:

File exceeds the maximum upload size for this site.

php.ini Method

If you are using shared hosting like GoDaddy, Bluehost, you will not see a php.in file. Create a file called php.in and upload it in the root directory, then edit php.ini add the below code.

.htaccess Method

Open or create the .htaccess file in the root folder and add the following code.

wp-config.php Method

functions.php Method

WordPress Multisite Method

If your website is a WordPress multisite installation and your php.ini is in OK but still unable to upload large files, follow the steps below.
Navigate to Settings >> Network Settings.
In Max upload file size under Upload Settings section, increase the field value to a higher kilobyte value. For example, inserting 9000 will increase the upload limit to 9 megabytes (MB).

Vijayan J

Thanks for stopping by guys! I'm Vijayan and Techpulse is my beloved brainchild. Currently working as a PHP developer in a digital marketing start-up, I'm overly passionate about not just learning new things but also putting those into practice. I swear by a quote I once came across... 'What separates successful people from unsuccessful people is the former's ability to execute'. Feel free to reach out to me if you have any questions, suggestions or feedback. Hoping to see more of you here!