Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

How to Increase the Maximum File Upload Size in WordPress

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Our readers often ask us to help them resolve issues related to file upload limitations. This simple website setting can have unexpected effects on your site.

For example, sometimes a low file upload size limit can stop you from uploading files with the media uploader or installing larger WordPress plugins and themes. This can be very frustrating, especially when you’re not sure how to change the limit.

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

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 never to upload videos to WordPress.

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

Video Tutorial

Subscribe to WPBeginner

If you’d prefer written instructions, then 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’s website, like Bluehost, and log in.

Then, click the ‘Chat’ icon at the bottom of the screen. You can then ask the support staff to increase the file upload size on your WordPress site. 

Clicking the Bluehost live chat support button in the dashboard

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.

You will find a cPanel button at the bottom of the Hosting tab in Bluehost.

Open cPanel in Bluehost

Clicking this button will open your cPanel dashboard.

Now you need to scroll down to the Software section and click on ‘MultiPHP INI Editor’.

MuliPHP INI Editor in Bluehost's cPanel

Next, scroll down to the section labeled ‘upload_max_filesize’ and enter a new maximum filesize into the box.

Then, click the ‘Apply’ button.

Upload Max Filesize Setting

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 are finished, just 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 are 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 ‘256M’ 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.

Instead of editing the file directly, we recommend using WPCode. It’s the best code snippets plugin that allows you to add code to your website without breaking it.

If you haven’t done this before, then see our beginner’s guide on how to add custom code in WordPress.

First, you need to install the free WPCode plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you should navigate to Code Snippets » + Add Snippet. You will need to hover your mouse over the ‘Add Your Custom Code’ option and then click the ‘Use snippet’ button.

Add a Custom Snippet in WPCode

On the next screen, you need to give your new snippet a name and change the code type to ‘PHP Snippet’.

Then you can copy and paste the following code snippet under ‘Code Preview’. Make sure you change ‘256M’ to the maximum file size you need:

@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );
Save Your Custom Snippet in WPCode

Finally, switch the toggle at the top to ‘Active’ and then click the ‘Save Snippet’ button. The code will now be executed on your website.

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 the .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 are not comfortable adding code to WordPress, then this could be a good option for you.

The 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. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

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

408 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Mouad Chafai says

    Thanks php.ini method worked perfectly.

    i’ve created the php.ini :)
    add lines:

    upload_max_filesize = 64M
    post_max_size = 64M
    max_execution_time = 300

    thanks for the article.

  3. Ben Peacock says

    Sorry please find this instead Login to the root machine type the following command nano /usr/lib/php.ini

    find ; Maximum size of POST data that PHP will accept.
    post_max_size = 2M change this to 64

    Save and exit and then you should be able to upload what you need hope this helps :)

  4. Maria McCarthy says

    Adding the php.ini file to my wp-admin folder SPECIFICALLY worked for me as well! Thanks everyone! Only took me almost 4 hours to find a page that had the info which would work for me – lifesavers!

  5. Mike says

    with some host ( godaddy ) for example, there may be some additional steps.

    And to what php you are running. For godaddy with php5, rename php.ini to php5.ini and remember if you have accuracies running, you will have to temp. end them before the file will even take over, or wait awhile for it.

    System Processes / End all

  6. jaymz says

    Many thanks for the article. For self-hosted there’s another way as methods 2 and 3 didn’t work for me as the .htaccess change had no effect and neither did adding a php.ini file in /wp-admin. It was simply a case of finding the existing php.ini file for Apache. On Ubuntu I ran;

    sudo find / -name php.ini

    This found my ini file in /etc/php5/apache2/
    All that was needed was to locate the parameters and update the values for;

    Thanks for getting me there!

  7. D Winzell says

    Thanks for writing this. The php.ini does need to be in the wp-admin directory to function correctly. Just checked my host (Vaurent) and they allows up to 105M file uploads so I am going to find something that size and see if it makes it’s merry way up to my blog.

  8. Matt says

    I just want to add, using godaddy you cannot use the htaccess method, it will throw you into a 500 internal service error.

    You must use the php.ini method. Only difference will be you have to have a php.ini and a php5.ini and the lines must be added to both. The files need to be in the root directory of where the wordpress install is, not in the wp-admin folder, outside of it.

    Also if you have multiple wordpress installations This has to be done and placed into each directory that each wordpress installation is located.

  9. sandeep says

    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 1500
    php_value max_input_time 1500

    i use these values in .htaccess and it works !


  10. Thyme says

    So I did all of those and changed the php.ini in the /etc folder (my site is on mediatemple’s grid-service) and nothing was working but then I vaguely remembered there was something I had to change in the network settings if my installation was multisite and there it was. Ugh.

    So yeah, if you’ve got a WordPress network, go to your network settings and change the max file size upload near the bottom of the page.

  11. Alex says

    This is the only thing that worked for me, I tried all the options, I’m on 1&1

    memory_limit = 32M
    upload_max_filesize = 32M
    post_max_size = 32M
    file_uploads = On

    ** Size can be anything

    The key was the “file_uploads” line

    Place this in the /wp-admin/ folder.

  12. Bogdan says

    Great advice. My upload limit was 8MB and I only tried the htaccess trick and it worked, it increased to 64MB. I tested it and it is owrking beautiful! Thank you so much for your great advice!

  13. VoidnessMD says

    Important thing to note: Using the php.ini method requires that the file be located in the wp-admin folder, not the root of your WP installation.

  14. Bongo says

    This website is the coolest for learning WP! Keep up the good work guys…more please…more! lol

  15. mostafa says

    i successfully did it with the third method. my upload size was 8 M, but now its 64 M. for me its more than enough.

    Thanks a million.
    by the way i’m from Iran.

  16. Rowan Evenstar says

    The creating a php.ini file and popping it on the route sorted it straight away!
    Cheers, much appreciated!

  17. assassinateur says

    thnx, but i am in a shared hosting so nothing work, i did put the php.ini in wp-admin and in the blog folder and in the homefolder and dodnt work also .htaccess didnt work changed the theme and didnt work

  18. Arvind Kukreti says

    Adding code in .htaccess file might throw you 500 Internal Error… the best way is create a php.ini file and upload it in wp-admin folder

    • Stephen Afije says

      Waooo that was brilliant one there all i did was to create php.ini and uploaded to the wp-admin folder it worked like no other thing thanks

  19. Andrew Lilly says


    I have done all of the above and still wont let me import an 11mb xml file. i need it as its got 1500 products on i need to import.

    I have spoken to my virtual server provider 1and1 and they said all i need to do is add the code to the .htaccess file but it doesnt seem to work

    Please someone help

  20. Makarand Mane says

    I have hosting on mediatemple. First two methods are not worked me. Only htaccess methos is worked for me.


  21. Gavin says

    I found that php.ini was hidden in the cgi-bin folder which some shared servers have in their root directories. I amended this as above (AND added a php5.ini jut in case) but until I’d amended this, nothing else worked. Thanks for the VERY useful thread!

    • Cath says

      Thanks Gavin, none of the other methods worked for me then I saw your comment, there were php.ini and php4.ini files were in the cgi-bin folder. I found the relevant code in both files – post_max_size = , and upload_max_filesize = , amended these and now all works fine.

  22. Anthony says

    The only thing that worked for me was to create/edit a php.ini file and add the following:
    memory_limit = 100M upload_max_filesize = 100M post_max_size = 100M file_uploads = On
    and uploading it to the wp-admin folder.

    • Alan says

      Option 2 worked perfectly fine, though I had to place the php.ini file into the wp-admin folder instead of the root directory.

      phpinfo was detecting the php.ini file in the root, but not WordPress.

      I currently have WP 3.2 installed…

  23. kat1111 says

    I am evidently newer than most here, I don’t understand which is “root” directory, is it Editor under the Appearance tab? Also, I don’t undertand how to get to hcaccess. Any help is appreciated.

  24. Snipsley says

    Thanks, but neither of this worked for me.

    But I found the solution!
    I had to place that php.ini to /public_html AND /public_html/wp-admin and it works!

Leave a Reply to Niall Flynn 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.