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

bukanspot

Indra Wahyu

Posted on May 1, 2024

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

πŸ’– πŸ’ͺ πŸ™… 🚩
bukanspot
Indra Wahyu

Posted on May 1, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related