WordPress by default limits the number of file types, that you can upload on WordPress site for a good reason. You can try this yourself. Just create a new post. Then select “Add Media”. Then try to upload an “EXE” file or a “PHP” file. WordPress will reject that file with a nice security reason.
WordPress allows to customize the allowed file types with WordPress hooks. You just have to update your theme’s function.php with a few lines of code and you will able to upload those types of files. For some people, this way is OK but for others, who are constantly uploading different types of files on their blog, this is not a good solution.
Disabling The Filtering
This process of disallowing certain types of files in WordPress is known as filtering. You can simply disable this filtering by using following code. You have to add it in your wp-config.php.
Note: Now you have allowed upload for all types of file on your blog. This may lead to serious security issues. Take care that any file uploaded on the server can be executed if it is not managed properly.