简体   繁体   中英

Server upload size limit but not php.ini

I use a Linux VPS server. All sites have the same upload limit of 188KB. On all wordpress sites if I upload an image over 188KB I get "Failed to write file to disk."

I used a plugin to download images from external URLs and it just crops the image once it reaches the size of 188KB.

Both upload_max_filesize and post_max_size are set to 64M so it's not a php.ini problem.

I have no idea where this limitation is coming from, any ideas?

Is there anything else on server that can affect the upload file size, apart from php.ini? Notice that anything uploaded via ftp has no limit.. only when files are uploaded via sites directly.

Okay, so after some thinking and minor researching, I've found a few things:

Disk Full?
Make sure that your Disk has some space!

Correct File Permissions
You or someone else might have done something to the file permissions, or this could have been done by some application, to fix something like this, make sure that you have setup read, write and delete permissions on your WP-Content Folder.

Clear temporary folder of the server
Sometimes this issue occurs if the temporary directory where PHP stores the newly uploaded file is full. Normally users don't have access to this temporary directory and that's why you will need to contact your web host and ask them to clear the temporary files in the server directory. Contacting support of your host will help you here.

Other than these three, I was unable to find much else.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM