File upload with WordPress

While uploading files to WordPress I have had no problems until I tried the first file which was not a media file. I got the message that it is not possible because of security reasons. In the backend I didn’t find any configuration to select which files are allowed and which not.

After a short internet search I found two solutions.

One is a plugin from Peter Westwood which is integrated into the admin backend and allows comfortable editing of types which are allowed to be uploaded.

The second way to solve the problem is more straight forward. In the function wp_check_filetype() which is located in wp-includes/functions.php you can find an array with all types wich are allowed to uploaded. Just add the type you want to upload.

But be aware what you are doing! There is a good reason why types of files are checked before upload to server. Just thing a few minutes before changing the code and allow .php, .exe, .sh and so on…

Leave a Reply

Your email address will not be published. Required fields are marked *

*