Hello Friends,
If you are one of them to see the error message as shown in the image below while uploading the file on WordPress, like Sorry, you are not allowed to upload this file type. Then this is the right article for you where you can easily upload the required file or any unsupported file type in WordPress media library.
Here I am trying to upload Windows Registry (TLS.reg) file where WordPress not allowing me to do the same. Follow this article step by step and configure the WordPress properly so that you can easily upload unsupported file type in WordPress media library.
Table of Contents
Why this error message showing you even if you newly installed WordPress
The answer is very simple, due to security reason WordPress does not allow you to upload any unsupported file type in the WordPress media library by default. But you want to upload the specific file type where you want to distribute it to the visitor or customer through your WordPress website. Hence this is also the mandatory for you to upload the specific or unsupported file type in the media library on WordPress and distribute it easily at any cost.
By default upload allowed file type and their extensions are in WordPress
Images – .jpg, .jpeg, .gif, .ico, .png,
Documents – .pdf, .doc, .docx, .ppt, .pptx, .ppsx, .pps, .odt, .xls, .xlsx, .PSD
Audio – .mp3, .m4a, .wav, .ogg,
Video – .mp4, .m4v, .mov, .wmv, .avi, .mpg, .3g2, .ogv, .3gp,
By default upload not allowed file type and their extensions are in WordPress
Images – .svg, .bmp
Documents – .psd, .ai, .pages
Coding files such as – .json, .css, .js,
Video – .flv, .qt, .f4l,
But apart from these extensions, others extension are also not allowed to upload in WordPress media library which are not included in by default upload allowed file type. Like Windows Registry (.reg) file, any Executable (.exe) file etc.
What happen if we allow uploading unsupported file type in WordPress media library
Keep in mind by allowing this to upload the unsupported file type may have the potential risk to be misused and can be a security breach. So allow it at your own risk with the below PHP code to upload unsupported file type in WordPress media library.
PHP Code to allow unsupported file type to upload in WordPress media library
Browse your File Manager and please pay attention while updating the wp-config.php file under public_html on your WordPress site. I strongly recommend you to take the fresh backup of your wp-config.php file before doing any changes in the file. And do this carefully as per the video below on our Computics Lab YouTube channel. Copy and Paste the PHP code below in wp-config.php file and Save it. And then Refresh the media library window and try to upload desired file in WordPress.
define(‘ALLOW_UNFILTERED_UPLOADS’, true);
As you can see in the image below after updating the wp-config.php file in WordPress I am able to upload any file type in WordPress media library.
Here is the video for you guys on our Computics Lab YouTube channel that you can refer and solve it at your own pace. Must like, share and subscribe our Computics Lab YouTube channel which motivate us to create more awesome helping tech videos for you. Thanks for reading and if you have any feedback, don’t forget to comment us on our YouTube video or to this blog post. We will happy to help you!!!
Thanks for reading!!!