How to increase maximum file upload size in WordPress?
Linode
Linode Staff
How do I increase the maximum file upload size limit in WordPress?
2 Replies
ameyers
Linode Staff
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