Question
How I can fix this issue "The uploaded file exceeds the upload_max_filesize directive in php.ini"
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.
×
I think you need to edit the php.ini file
and change the default value you need to find the pathof the file and nano it or vi as a su
here’s a link that may help you http://wptheming.com/2009/07/upload_max_filesize/
in my case I am using WHM and I am able to edit the php settingsfrom within the WHM control panel.
Login to SSH
upload_max_filesize = 2M
(default is set to 2MB)sudo service apache2 restart
) Done!Try uploading again :)
This option is for the date base of upload in PHPMyAdmin, but I want to know how to increase the upload of Media in WordPress (php.ini the wp-admin folder) because I have not found. Uploading default WordPress is 20M. Can anyone help? Thank you.
Connect to your root via the following:
For example, if the server IP address was 123.234.123.234, the command would look like this: ssh root@123.234.123.234.
Enter your password and hit enter.
Paste the following command. vim /etc/php5/apache2/php.ini
Then hit enter.
Type /uploadmaxfilesize
Then hit enter.
Use your cursor to hover over the 2M and change 16M. You can use the delete button to remove additional characters if you make a mistake.
exit (press control x to exit)
restart Apache by using command (sudo service apache2 restart) Done!
Try uploading again :)