DEV Community

Indra Wahyu
Indra Wahyu

Posted on

The uploaded file exceed the upload_max_filesize directive in php.ini

Problem

My programmer has this error while uploading file in wordpress

The Uploaded file exceed the upload_max_filesize directive in php.ini

Solution

Find php.ini file location

php -i | grep 'php.ini'
Enter fullscreen mode Exit fullscreen mode

Change this value inside in php.ini

upload_max_filesize = 12M
post_max_size = 13M
memory_limit = 15M
Enter fullscreen mode Exit fullscreen mode

Or add this code to first line of .htaccess file (is located in WordPress installation directory)

php_value upload_max_filesize 12M
php_value post_max_size 13M
php_value memory_limit 15M
Enter fullscreen mode Exit fullscreen mode

Note:

  • Change the file size with your case study

Reference

Top comments (0)