Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Increase the Maximum File Upload Size in WordPress

Do you want to increase the maximum file upload size in WordPress? 

Sometimes a low file upload size limit can stop you from uploading files with the media uploader or installing larger WordPress plugins and themes. 

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

How to increase the maximum file upload size in WordPress

Why Increase the Maximum File Upload Size in WordPress?

Your WordPress hosting provider will set a default maximum file upload size when you sign up and install WordPress. Your hosting provider defines this limit, and it usually ranges from 2MB to 500MB.

For most WordPress website owners, this limit will be more than enough.

However, there are times when you’ll need to raise this limit so you don’t run into upload errors.

For example:

That being said, let’s show you how you can increase the maximum file upload size on your WordPress site.

Note: Keep in mind that displaying a lot of large files on your website can seriously slow down its speed and performance. That’s why we typically recommend to never upload videos to WordPress.

Since most users have different WordPress hosting setups, we’ll cover the following:

Video Tutorial

Subscribe to WPBeginner

If you’d prefer written instructions, just keep reading.

How to Check Your Maximum File Upload Size Limit in WordPress

WordPress will automatically show the maximum file upload size limit when you are uploading images or other media.

To check this, simply go to Media » Add New in your WordPress admin panel, and you will see the maximum file upload size limit for your WordPress site.

Check current file upload size limit

Now that you know how to find the size limit, let’s show you how to increase the maximum upload size in WordPress.

Method 1. Contact Your WordPress Hosting Provider

One of the easiest ways to increase the maximum file upload size in WordPress is to reach out to your WordPress hosting provider.

This is a relatively simple task for their customer service team and can be done in a couple of minutes.

For beginners, this can be much easier than adding code to WordPress and editing server files. 

Simply head over to your hosting provider website, like Bluehost, and click the ‘Chat’ tab.

Then, enter your account details and fill out a support request asking to increase the file upload size on your WordPress site. 

Contact support to increase file upload size

You can also reach out to support from within your hosting account dashboard.

Method 2. Create or Edit an Existing PHP.INI file

Another way to increase the maximum file upload size is by creating or editing a file called PHP.INI. This file controls a lot of settings for your WordPress hosting environment.

Most WordPress hosting providers like Bluehost have a beginner friendly cPanel to help manage your website.

If your web host has a cPanel dashboard, then you can increase the file upload size through the built-in tools.

Note: The following is from the Bluehost cPanel, however, most shared hosting providers will have similar steps.

To do this, login to your WordPress hosting account dashboard and go to the ‘Software’ section.

Then, click on ‘MultiPHP INI Editor’.

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.

Change max upload filesize in settings

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’re finished click the ‘Save’ button.

Change max upload filesize in code editor

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’re 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. 

Then, add the following code snippet to the file.

upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300

You can modify the ’64 M’ limit to the file size you need for your WordPress blog.

Method 3. Add Code to Your WordPress Theme functions.php File

This method involves adding code to your functions.php file in your WordPress theme.

If you haven’t done this before, then see our beginner’s guide to pasting snippets from the web into WordPress.

After that, you need to open your functions.php file via FTP or the file manager app in your hosting account dashboard.. To learn more, see our guide on how to use FTP to upload files to WordPress.

Then, add the following code snippet at the bottom of your functions.php file.

@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );

Method 4. Add Code to Your .htaccess File

Another way to increase the maximum file size is by modifying the .htaccess file. This file controls the high level configuration settings for your website.

To do this, you need to log in to your website server via FTP. If you haven’t done this before, then see our guide on how to use FTP to upload files to WordPress for beginners.

After that, you need to locate your .htaccess file in your website’s root folder. 

Open .htaccess file

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 .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

Another way you can increase the maximum file upload limit is by using the WP Increase Upload Filesize plugin. If you’re not comfortable adding code to WordPress, then this is a good option for you.

First thing you need to do is install and activate the plugin. For more details, see our guide on how to install a WordPress plugin.

Upon activation, navigate to Media » Increase Upload Limit in your WordPress admin panel.

This brings you to a screen where you can select a new file upload size in the ‘Choose Maximum Upload File Size’ drop down. 

Then, click the ‘Save Changes’ button.

Increase file upload size with plugin

Note: The maximum file upload size will be set by your hosting provider. If you need a file size limit that’s larger than the one listed in the drop down, then you need to contact your hosting provider and ask to increase the limit. 

We hope this article helped you increase the maximum file upload size in WordPress. You may also want to see our guide on how to choose the best website builder and our expert picks of the best virtual business phone number apps with free options.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

404 CommentsLeave a Reply

  1. Thanks, this helped me troubleshoot an upload limit. I’m on a WordPress multisite network install, so it ended up being a setting in the Network Admin Settings.

    I was confused at first, because my php settings were allowing larger uploads, but it was restricted in the Network Settings.

  2. Would have been great if you have included the .user.ini method.

    .user.ini uploaded in the root folder with the same value/text in your edited php.ini

    Most of the time, only this method works for shared hosting.

    ErnestPH

    • The php.ini file should work the same as the user.ini file unless your specific host ignores the php.ini but thank you for sharing your recommendation :)

      Admin

  3. Not working for me.
    I have followed this guide and double checked the php.ini file to make sure that the changed are in fact saved. changed htaccess file to increase limits. and also tried modifying the phpMyAdmin httpd-app.conf and php-settings.conf file. All of these files reflect max upload higher than 40m and my WP site does not reflect Any of these changes. Really frustrated here.

    Please help me, thanks !

    • If you haven’t already, you would want to reach out to your hosting provider to ensure there is not a setting on their end that is overriding what you are setting :)

      Admin

  4. i have tried all 3 method none of them worked. i am trying to upload newspaper theme in my in my wordpress site. but every time it show that php.ini file upload max file size.
    plz help me

    • You would want to reach out to your hosting provider to ensure they don’t have a setting that is overriding the changes you made.

      Admin

  5. Watchout for hidden php.ini files. In my setup I found 2 of them. The one which I found actually resolved the issue was found under

    ./etc/php/7.0/apache2/php.ini

    modifying this file fixed my issue.

    • Thanks for sharing your solution, with where that file is located we would recommend most users reach out to their hosting provider before looking in locations like that.

      Admin

  6. Thanks buddy i have solved my problem by adopting method 2 by editing my php.ini file
    Thanks alot you are working great

  7. None of the above worked for me. A matter of fact, editing the htaccess file broke my site even after deleting the above code. Overwriting with a new file fixed the problem though.

    I have a dedicated server on Bluehost. What worked for me was going in the WHM root, not cpanel nor FTP access. Search for MultiPHP INI Editor. Give it at least 5 minutes to load if you only see the title and icon. You can set you upload time, post size, etc. there. Works instantly, even if your site is using Cloudflare, without placing it in development mode or clearing the cache. I hope this helps someone.

    • Thank you for sharing what worked for you, should other users be on a dedicated server, if they reach out and let BlueHost know the need to increase the upload size then BlueHost can normally edit that for them :)

      Admin

  8. when i tried this
    Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.
    this happened to me
    whats the solution of this

  9. I had been trying php.ini method but it never works please how will I set it..
    Or you should please tell me the were to paste at function.php

    • You would normally use a text editor to set the content in the php.ini file. For your functions.php it should go at the end normally so it can be removed later as needed. You may also want to check with your hosting provider if you are having trouble with these methods for if they can assist in increasing the file size for you.

      Admin

  10. None worked for me. But this one fixed it – add to your .htaccess this line:

    LimitRequestBody 104857600

  11. I am using Nginx and i had already setup properly the values for php in the php.ini but what fixed it was puting the same value in the server block with the variable client_max_body_size xxxM;

    I am writing this hoping it will help someone.

  12. None of the options worked for me. Nothing happened when I tried the first two, and the last one prompted an error 500. Any way you can help?

  13. The above explanation is fine for hosted sites, bit what about us guys that locahost? I still can figure out the “upload_max_filesize” error when downloading Updfaftplus from WP Plugins or from a download zip file. I am a beginner and need hand-holding through this process. Help is appreciated.

  14. hta access worked.
    you guys must put the code before #END WordPress
    if you put after #end wordpress then site goes to 500 internal server error in my experience with godaddy hosting

  15. On most of the shared cPanel sites I’ve setup:

    -changing .htaccess brings the whole site down (500 internal error)
    -adding php.ini or php5.ini files does nothing
    -there is no option to choose ‘Site Software’ in cPanel…

  16. Thank you! This was a huge help! I couldn’t even upload plugins because my limit was pre-set at 2MB…Now I’ve got it to 64MB and am able to work.
    Thanks!

  17. On vidahost (now TSOhost).

    Adding the following php.ini worked for me… however (and I’m still a bit confused why), just putting it at http root didn’t work – I had to duplicate the php.ini file inside wp-admin and wp-include directories within wordpress.

  18. I’m on HostGator and currently having issue with max execution time. It occurred a few weeks ago and HostGator support fixed the issue. It now reappeared and support is telling me that they can’t fix it because I’m on shared server. The agent even crashed my site by manually editing the htaccess file and didn’t verify if it was working or not. He did however recommend a plugin that would edit the htaccess file with code to increase the limit but it doesn’t work. I guess HostGator blocks it

  19. I added the code into the .php functions folder, and now WordPress will not load. How do I fix this problem??

  20. I have GoDaddy hosting and contacted them to help me increase my file upload size. It was a piece of cake — I didn’t have to create any files, add code to my theme, or anything like that. So for those of you who have GoDaddy or cPanel type controls, forget hacks and just use your admin settings.

    Here’s what support had me do:
    1. Go to your cPanel Admin (a similar hosting panel ‘might’ work somewhat the same)
    2. Scroll down to the ‘Software’ and click on ‘Select PHP Version’
    3. Click on ‘Switch to PHP Options’ in the top right And TADA! There’s all your PHP Options!
    4. Just go down and change the ‘post_max_filesize’ and ‘upload_max_filesize’ to whatever you want, apply and save your changes, and you’re now a safe and happy non-coding website owner.

    Good luck!

    • This worked for me but in order to even find these files, I had to call godaddy where I was walked through these steps or I never would have been able to navigate to the cpanel Admin without their help.
      1. Sign on to godaddy
      2. Click on my products upper left
      3. Under web hosting click manage all
      4. Click web hosting with C panel
      5. Click C panel Admin icon
      6. Scroll down to Software and click Select php version
      7. Click on switch to php options
      8. At bottom of page click on the number upload_max_filesize and select # you wish as the max filesize
      9. Click apply. It works. Now file sizes can be uploaded to the selected max.

  21. Multisite Users:
    If your a dumb dumb like me, you may have tried everything to no avail.
    Don’t forget if you’re using WordPress Multi-site, to change the upload settings for individual sites.
    Network Admin > Settings > Max upload file size

    You may still need to use the tips in this article, but without changing the upload settings for multi-site, you won’t know if it’s working.

  22. Anyone on here get this to work with Godaddy? There are very unhelpful. I know I need to create the php.ini file, (and I did), but none of the solutions you posted worked. Any help is appreciated.

  23. Wish you wouldn’t assume everyone looking for this solution knows what you mean by our “Theme Functions File” – do you mean functions.php? I’m not an expert, and I’m really good at following precise directions, and don’t want to even put a toe in the water of editing files if I don’t know EXACTLY what file you’re talking about! No clues were provided, like what other code I might look for in the file to know I’m in the right place, etc. So…this didn’t help me at all :-(

  24. Thank you, method 3 really worked for me
    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300

  25. This worked for me.

    Open your .htacess file with notepad.

    Skip everything you see and at the bottom.

    Paste the following and save.

    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300

    • Where exactly did you paste it?

      # BEGIN WordPress

      RewriteEngine On
      RewriteBase /
      RewriteRule ^index\.php$ – [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]

      # END WordPress

      php_value upload_max_filesize 64M
      php_value post_max_size 64M
      php_value max_execution_time 300
      php_value max_input_time 300

      Is it before the #END WordPress statement? ( I get error when I do that)

      Or should it be after the #END WordPress statement?

Leave a Reply to Stef Thoen Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.