DEV Community

Indra Wahyu
Indra Wahyu

Posted on

The uploaded file exceeds the upload_max_filesize directive in pnp.ini (wordpress)

My Problem

I want to upload files in WordPress with large file size, but have error "The uploaded file exceeds the upload_max_filesize directive in pnp.ini"

upload_max_filesize


My Solution

Go to wordpress directory. for e.g:

cd /var/www/html/wordpress
Enter fullscreen mode Exit fullscreen mode

Open file .htaccess

nano .htaccess
Enter fullscreen mode Exit fullscreen mode

Add the following line at the bottom of the file:

php_value upload_max_filesize 256M
Enter fullscreen mode Exit fullscreen mode

Then Save the changes.

That’s it! Increasing the upload_max_filesize value should automatically fix the error.

if not work, try to restart your web server (e.g. apache/nginx)


Reference

Top comments (0)