How to increase maximum file upload size in WordPress?

Linode Staff

How do I increase the maximum file upload size limit in WordPress?

2 Replies

I've encountered this upload file size limitation when configuring my own WordPress site. Here are the steps that I followed for increasing the limit to 1 GB that worked for me -

1. Create a php.ini file in the wp-admin directory and add the below lines:

upload_max_filesize = 1000M
post_max_size = 1000M

2. If you're using Apache, modify ownership of the file to www-data using the below chown command:

sudo chown www-data:www-data php.ini

3. Modify the .htaccess file in the site's root directory to include the following lines after # END WordPress

php_value upload_max_filesize 1000M
php_value post_max_size 1000M
LimitRequestBody 0
php_value memory_limit 3000M
php_value max_execution_time 180
php_value max_input_time 180

4. Restart the web server (Apache):

sudo systemctl restart apache2

I believe what you mean is to create a .user.ini file NOT a php.ini file.



Please enter an answer

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] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct