WordPress file size limit

Linode Staff

Hello,

I have a WordPress site for a client and the site has a file upload max size of 2MB. The client is trying to upload a 10MB file but it won't upload to the WordPress Media library because of the 2MB limit.

I found this article and it says to try adding code to the .htaccess file but the site wouldn't even come up so restored the original .htaccess file and the site came back up.

Another choice is to edit the theme's functions.php file which I did but it made no difference. WordPress was still telling me 2MB max in the Media library section in the Admin.

The last choice is to edit the php.ini file. I downloaded it to my laptop using FileZilla and found the line uploadmaxfilesize = 2M. I changed it to uploadmaxfilesize = 12M. It still made no difference. Not sure what to do now. My server runs Debian and Apache PHP5.

1 Reply

One thing worth taking a look at would be the PHP settings outlined here. Apache will include its own php.ini file at /etc/php/5.0/apache2/php.ini.

Alternatively, the following line could be added to the bottom of the site's wp-config.php file as advised by this article:

define('WP_MEMORY_LIMIT', '3000M');

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