How can I increase the upload_max_filesize in WordPress?

  • Posted on November 10, 2013
  • msahariaAsked by msaharia

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


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

5. type : ```sudo service apache2 restart```

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

<pre>sudo service apache2 restart</pre>

Hi, all

You can create a php info file in order to check the current values and check which is the php.ini file in use. Create the following file in your public_hmtl folder - phpinfo.php and put the following code inside it:


Then check for the current value of upload_max_filesize you can also check which is the configuration file - php.ini that is currently used and apply the changes there (if the site using the global php.ini file and you change the values for these settings this will make the changes globally for all sites). Ideally you would like to have the following values:

upload_max_filesize = 64M

Hope that this helps! Regards, Alex