Max upload size exceeded. Super Size me Please

Using WordPress as an online blog is well known. However having it as a locally hosted site either/ and as a development bench is also more than useful.

However while I seem to collect, as in download, useful video’s from across the world, or even video’s that I suspect might disappear in the future, there comes a point when their file size is too big for the WordPress upload agent. In this case you get an error message like your upload exceeds the maximum upload size for this site.

Oh dear! Well what you need to do is to edit php.ini file that on Ubuntu lives in /etc/php5/cli.

You’ll need to be root to save your changes to this file, so my technique was to Ctl+Alt+t to bring up a terminal window. Next type in sudo gedit and you’ll be prompted for your root password.

Now gedit will open with root security, and then you can drag and drop your php.ini file into the gedit window.

Now to make your changes.

Using Ctrl+f to bring up the ‘find’ bar, there are two places you’ll need to make changes.

upload_max_filesize = 32M
post_max_size = 32M

Changing upload_max_filesize on its own won’t be enough. You need to change post_max_size too.

Finally apache will need a restart to read the new settings:

sudo service apache2 restart

As I am working locally, I care not. I whacked mine up to 250m on both. Yep, some of those video’s are indeed around 120mb in reality, but I’m sure this gives me room for growth.

I’d not do this on a production site unless there were good reasons for it.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.