Increase WordPress Upload Limit on BlueHost

I was moving a client’s site from an old host to an up-to-date WordPress install on Bluehost and I hit the upload limit.

On the old site, I used Tools > Export to get the content, which gave me a 10MB xml file. When I went to Tools > Import on the new site, it had a max of 2MB.

I found this post on how to increase the upload size with the .htaccess file, but it didn’t seem to work for me. But, it did lead me to the solution:

  • Log into your Bluehost Control Panel, and under Find type “PHP”. Click on “PHP Config”
  • Click the big button in the middle of the page that says “Install PHP.INI Master File”. That will add php.ini.default in your public_html folder
  • Open your html editor, connect to your server, and open php.ini.default. Copy all the contents, then make a new file called php.ini and paste it in there.
  • Search for the following variables and change them to these values:
    • memory_limit = 34
    • post_max_size = 33
    • upload_max_filesize = 32
    • max_execution_time = 600

That will increase your max file upload size to 32MB. If you’re just using this to import your content, I’d recommend deleting the php.ini file afterwards, resetting the upload limit back to the default.

Bill Erickson

Bill Erickson is the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk

Reader Interactions

Comments are closed. Continue the conversation with me on Twitter: @billerickson

Comments

  1. Christine Green says

    Bill,
    When I tried to install wp-commerce on a client's site I got:
    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /home2/clientsite/public_html/wp-content/plugins/wp-e-commerce/merchants/paypal_pro.php on line 280

    I then used the instructions you provided here to create new php.ini file and changed limits. That worked and I was able to install wp-commerce.

    Then the next day when I tried to install the NextGEN Gallery plug-in I got this error:
    Fatal error: Allowed memory size of 35651584 bytes exhausted (tried to allocate 122880 bytes) in /home2/clientsite/public_html/wp-admin/menu-header.php on line 90

    Any suggestions?
    Thanks!

    • Bill Erickson says

      You'll have to contact hostgator support. Once you figure it out,
      please post the solution here for others with the same issue.

    • Nimitz says

      It should worked. Try to find the variables.

      memory_limit = 34
      post_max_size = 33
      upload_max_filesize = 32
      max_execution_time = 600

      P.S if you can see additional variables to the default values like memory_limit = 34 is memory_limit = 34M in you php.ini then you need to just replace the values and leave the variable M.

      Hope that helps.

    • Bill Erickson says

      Follow the instructions in this article and it will increase the media upload limit.

  2. Keren says

    Hi Bill,
    Thanks a lot for this info, it was really helpful and solved my problem.
    2 questions though:
    1. What’e wrong with leaving the new settings? (32M)
    2. Before I found your answer I was trying to upload the file to bluehost and just add the URL link to my post. I did upload the file using File Manager but I can’t actually do anything with it right now or at least I can’t find any link to it. Do you have any suggestion how to do that?
    Thanks,
    Keren.

    • Bill Erickson says

      There’s nothing wrong with leaving the new settings (I have it set to 32M on my site) but I typically drop it down on client’s sites so they don’t upload very large files.

      I’m not sure what you’re doing in the second question. Did you upload the xml export file directly to the server? You should use WordPress’ import tool (Tools > Import ) so that the content will be added to the database. If you’re using this to move a large website you might want to take a look at my post How To Move Your WordPress Website which provides a better solution.

      • Keren says

        I actually just wanted to upload a big video file to insert into a post.
        The import tool seems more for importing a complete blog or so..

        • Bill Erickson says

          Ah, no worries. For video I highly recommend just uploading it to a 3rd party video hosting service like Vimeo or Youtube, then dropping a link to it in the post. WordPress will automatically convert it to the embedded video player. If you host your own videos you’ll need to find a video player plugin.

  3. Biron Phillips says

    I followed your instructions above and i still have the cap on my upload limit. i was wondering if i just had to save the file after i changed it or somehow upload it to my website for the changes to take place.

    • Bill Erickson says

      You should only have to save the file. If it’s not working, you might try contacting your host’s support.

  4. Curtis F says

    Great! This worked like a charm. Thank you!

    Now using the wordTube plugin, I can host HD video technique playlists on my blog. I use Page Security by Contexture to restrict access to the techniques I only want my students to have access to.

  5. daniel griffin says

    Great post, I’m trying to upload a 11mb audacity podcast I made to my WordPress site. The limit says 8mb. I uploaded it to blip tv and linked it to my WordPress site. It plays fine but I’m not getting the right rss feed to upload the podcast to itunes. I’m going to try this technique to upload my mp3 file to WordPress so I can have the rss feed. I will post back right after I try this, thanks

  6. Brian Lis says

    fyi now with BlueHost after you create the php.ini.default file. You also have to change the post_max_size = file size also.

  7. Ellen says

    I’m having trouble just creating the php.ini.default file or finding it (if it exists)…
    When i go to my cpanel and go to phpconfig, i don’t have the option of selecting a master php file… It has pre-selected for me, “PHP 5.2 (Single php.ini)”…

    • Bill Erickson says

      Try contacting Bluehost support. They might have changed the interface or options since I wrote this.

      • Ellen says

        Solved it! I thought those were my settings but apparently they weren’t… just had to click save at the bottom!

        Thanks! 🙂

  8. Cao says

    I used these simple instructions – we’re on hostgator. I called support, they changed the file requirements in a few seconds. What I was trying to do is upload mobi and epub files, and this was necessary! Once I got wordpress to ‘play nice’ with those files, I called hostgator to set the php.ini file back to the default settings. This all took me less than 1/2 hour. Thanks for the specific tips to do this! EXTREMELY HELPFUL!!!