codycode
By:
codycode

Max upload file limit wordpress for a single site

January 26, 2015 3.4k views

Hi guys, I'm running LAMP on Ubuntu 14.04 and I have multiple sites running on a single droplet. I need to change the upload limit for a single site, but for the others to remain the same. I have tried .htaccess, adding a php.ini file in the virtual host root, but nothing seems to work. (http://www.elegantthemes.com/blog/tips-tricks/is-the-wordpress-upload-limit-giving-you-trouble-heres-how-to-change-it)
And yes, I have restarted apache2 each time.

If I change the configuration in /etc/php5/apache2/php.ini then that will change every wordpress on every website, and I don't want that.

Appreciate your help!!

1 comment
  • Perhaps try the opposite approach: change the global limit in your PHP to a higher amount (maybe 250), reload apache, and then lower that amount for the other sites using this in your .htaccess for each site (I have it at 64M, but change it accordingly for each site):

    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300
    
2 Answers

This question was answered by @sierracircle:

Perhaps try the opposite approach: change the global limit in your PHP to a higher amount (maybe 250), reload apache, and then lower that amount for the other sites using this in your .htaccess for each site (I have it at 64M, but change it accordingly for each site):

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

View the original comment

  • Kindly guide how to change the global limit in php.
    I have only one site of mine in $5 droplet of Digital ocean.

    And where to place this code:

    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300
    

    Kindly help.

I have created a plugin that very easily changes the max upload size in any PHP configuration - by using chunked upload. It splits the file into smaller chunks, and that allows you to upload any filesize.

https://wordpress.org/plugins/wp-awesome/

Please check it out and give me any feedback or bug reports and I'll promptly fix them.

Have another answer? Share your knowledge.