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,
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!
You should talk with your host about the problem. You shouldn't need to increase the memory limits every time you add a plugin.
—
Bill Erickson
WordPress Consultant
http://www.billerickson.net
I'm using hostgator i doesn't work for me
You'll have to contact hostgator support. Once you figure it out,
please post the solution here for others with the same issue.
Hi, I want to expand the upload size in media, what should I do?
thanks
Follow the instructions in this article and it will increase the media upload limit.
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.
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.
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..
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.
Thanks, you just pointed another issue I had with viewing this video..
But is there a way to upload it as a private video to youtube or vimeo? I only like to share it with a few people at this point of time so I wanted to post it as private post.
Thanks again for your help.
You might try this: http://www.seodenver.com/embed-protected-video/
You rock!!!
Thank you very much.
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.
You should only have to save the file. If it’s not working, you might try contacting your host’s support.
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.
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
fyi now with BlueHost after you create the php.ini.default file. You also have to change the post_max_size = file size also.