Solution Failed To Upload Files In WordPress

Failed To Upload Files In WordPress
Failed To Upload Files In WordPress

Have you ever experienced Failed To Upload Files In WordPress?? In the example picture above, because the php limit is still the default, in this article we discuss editing php.ini or adding .htaccess files in wordPress to add uploads limits, you can choose the one that is easiest. 

Failed to upload on WordPress is very easy to solved, you just choose to add .htaccess or edit in the php repository.

1. Edit php.ini add upload and post limits by remote ssh consule/putty then check the php version you are using;

php –version 

Failed To Upload Files In WordPress
Failed To Upload Files In WordPress

Create and upload directory and access permission in tmp, find the script below with Ctrl+W then change the value ;

sudo mkdir /var/www/tmp_upload

sudo chmod 777 -R /var/www/tmp_upload     (According to the php version you are using, in my example I use php 7.4)

sudo nano /etc/php/7.4/apache2/php.ini

file_uploads = On

upload_tmp_dir = var/www/tmp_upload

upload_max_filesize =128M

max_file_uploads =20

upload_max_filesize =128M

post_max_size =128

max_execution_time = 300

2. The easiest way is to add via .htaccess ;

copy paste scripts below add under .htaccess ;

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300

How easy is it not to overcome Failed To Upload Files In WordPress by increasing the uploads limit on wordpress by maximizing php.ini or .htaccess.

Hopefully this short article can be useful for all of you.

https://coblong.com

About the author

I Like Linux Although Sometimes it's Hard I Believe I Can, I Definitely Can and I Should be Able to. I Also Loves Websites, Php, Python and All About Linux.

Leave a Comment