Wordpress Error The uploaded file exceeds the upload_max_fil

Hi Folks,

I just set up a Linode and configured it per the 1G guide, after installing Wordpress I found I couldn't upload a theme due to the following error:

The uploaded file exceeds the uploadmaxfilesize directive (theme is 3MB)

I edited this category in /etc/php5/cli/php.ini:

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 200M

But it is still giving me the same error… I guess this is something silly that I'm missing, but would appreciate any insights!

4 Replies

I think you'll find '/etc/php5/cli/php.ini' only affects running php via the command line (CLI). There should be a /etc/php5/apache2/php.ini or /etc/php5/cgi/php.ini file, which you may have more luck with. Oh, and yes - restart Apache after making the changes.

-Chris

Thanks guys - I think Chris nailed it as there was another php.ini file that I changed and got a new error. This for file writing permissions - so I think that worked and now I'm going to figure the other one out.

Getting a new error makes me happy… Is that weird?

You might want to consider using PHP-FPM (Debian package name php5-fpm), in which case the file to modify would be

/etc/php5/fpm/php.ini

and you don't have to restart Apache but php-fpm instead.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct