How can I increase the upload_max_filesize in WordPress?

Posted November 10, 2013 30.5k views
I changed it here: sudo nano /etc/php5/apache2/php.ini but it didn't work. I am uploading a plugin of a size bigger than 2M. I tried the .htcaccess, but I get a 500 internal error. I have Ubuntu 12.04 Thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
12 answers

I follow your link and I fix it! Thanks because It work for me. Here is my way:

  1. using terminal (cmd) and connect to your server via ssh code
  2. type cd \ to go root folder
  3. type sudo nano /etc/php5/apache2/php.ini
  4. add after php.ini file upload_max_filesize = 32M post_max_size = 32M => save your php.ini file
  1. type : sudo service apache2 restart

After the instruction - go to your WP-admin and Bingo :)

sudo service apache2 restart
Did you restart apache2 after editing php.ini?
Thanks. No, I haven't. What was the command again?
Best and easy way is to install the WP HTACESS Plugin if you don't want to mess up with the console :) just increase the value via wordpress and you are done. :)
Thanks for the suggestion, Pablo. Nonetheless didn't work for me just by doing that. I had to look for the file and edit it too.
I did it, and I was able to upload a new theme, but later when i try to upload a picture 500kb , again the
exceeds the maximum upload size for this site! error.
Any suggestion? if yes, please include shh command.
@Multilabel: What webserver are you using? Have you tried restarting it after modifying the config files? If you're using nginx, make sure you restart php5-fpm too and modify nginx's upload limit: (#4 of
Sorry for the previous short answer as I thought I was signing in. I am fairly efficient with the command line, Apache, PHP and so on. With that in mind I would say the easiest solution (and the one I go with as far as WordPress is concerned) is to install this plugin . Once installed use the plugins tools to set your limit. To do this go to settings --> htaccess Control --> htaccess suggestions --> find the files size field and be sure to only input a numeric value. If this does not work you will need to ssh into into your server and go to sudo nano /etc/php5/apache2/php.ini
and edit the max_upload_filesize set it to something like 20M and be sure to run sudo service apache2 restart.
Previous 1 2 Next