This was recently driving me nuts. I couldn’t get my self-hosted WordPress installation to allow more than an 8MB file upload. My WordPress system is installed on a Mac currently running OS X 10.8 Mountain Lion, using the system administrator’s Web Sharing (which shares documents from /Library/WebServer/Documents).

Eventually I found the solution. You’ll need to be able to sudo to perform these steps (if you don’t know what sudo is, I recommend you don’t try this). Also, AFAIK, this will only work on OS X systems using the built-in PHP and Web Sharing to host WordPress. The solution to allow larger file uploads was:

  1. Back up /etc/php.ini to /etc/php.ini.BAK or some such (optional, but recommended)
    sudo cp /etc/php.ini /etc/php.ini.BAK
  2. Modify the /etc/php.ini file’s post_max_size from 8M to 64M, and upload_max_filesize from 2M to 64M (it’s a read-only file, so when finished editing simply force vi to write it out with “:w!”).
    sudo vi /etc/php.ini
  3. Using System Preferences -> Sharing, restart Web Sharing (uncheck it / check it)

That’s it! WordPress should now allow 64 MB file uploads.

BTW, once that’s done a diff between the files should look like this:

diff /etc/php.ini /etc/php.ini.BAK

< post_max_size = 64M
> post_max_size = 8M
< upload_max_filesize = 64M
> upload_max_filesize = 2M

Tagged with:  

Leave a Reply

Your email address will not be published. Required fields are marked *