WordPress Error:The uploaded file exceeds the upload_max_filesize directive in php.ini

>
I am getting this error despite of trying every possible solution provided on internet. Whenever i try to install a plugin i get this error again and again
This is what i have already done :-

I changed the upload_max_filesize in php.ini present in apache2 folder to 30M and pasted it in wp-admin directory

Read More

Secondly i created a .htaccess file in wp-admin directory and pasted some code I found on the internet.

Even after all this i am getting this error . Please help me out.

Related posts

Leave a Reply

3 comments

  1. Its mean you are uploading the file which is bigger than your upload_max_filesize in php ini

    • Locate the php.ini file in the folder your upload script resides in.

    • In the php.ini file, locate the line called ‘upload_max_filesize =
      2M’. Modify that entry to read

    • ‘upload_max_filesize = 10M’, or whatever your script requires. (M =
      megabytes)

  2. First of all you need to verify that the php.ini that you are modifying is actually affecting the php that is running on apache (usually php runs as an apache module) so, what you need to do is change the upload_max_filesize directive and then run a php script with the phpinfo() function and check that it actually is taking the change, if it isn’t check in that page where it says the php.ini script is running and verify it’s the same file you’re modifying.

    There are circumstances where there are different php.ini files, even files that aren’t even named as php.ini but that are loading the configuration of php, so it is important for you to figure out which file is actually relevant to the apache module, also you will find the need to check for this when you run php from the command line.

  3. I had the same problem, I tried several solutions and none worked until I edited the php.ini file in /etc/php5/apache2/php.ini and not in /etc/php5/cli/php.ini as everyone said.

    Just change these lines, save and restart your Apache:

    post_max_size = 100M 
    upload_max_filesize = 100M 
    max_execution_time = 180
    max_input_time = 180  
    memory_limit = 256M