Does WordPress get the error “Sorry, this file type is not allowed for security reasons”?
You can upload the most popular file types in WordPress without any errors. However, you may see this error if the file type is not supported by WordPress.
In this article, we are going to show you how to easily fix the “This file type is not allowed for security reasons” error in WordPress.
What causes the “Sorry, this file type is not allowed for security reasons” error?
“Sorry, this file type is not allowed for security reasons” error appears when trying to upload a file type that WordPress does not support.
You may see this error message when trying to add a new file to your media library.
For security reasons, WordPress restricts the file types that you can upload through your WordPress administrator. The file types accepted include all popular image, video, document, and audio formats.
One solution to fix this problem is to upload the files via FTP or your WordPress hosting file manager.
However, this isn’t as convenient as using the built-in WordPress media library.
So let’s see how to fix the “This file type is not allowed for security reasons” error in WordPress.
Check and correct the spelling of the file type extension
If you’re trying to upload a generic file type that you uploaded previously without seeing this error, it is likely that you misspelled the file extension.
A file extension is the 3 or 4 character file type suffix that appears at the end of file names on your computer. For example, an image file can be named Holidayphoto.png, where Holidayphoto is the file name and PNG is the extension.
These extensions are used by many programs and applications including WordPress to recognize file types. The following are the standard file types and extensions that WordPress allows:
Pictures: .png, .gif, .jpg, .jpeg, .ico
Documents: .pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pps, .ppsx, .odt, .psd
Audio: .wav, .mp3, .m4a, .ogg
Video: .mp4, .m4v, .mpg, .mov, .wmv, .avi, .ogv, .3gp, .3g2
Tip: Although you can upload videos to WordPress, we always recommend uploading your videos to a video hosting site instead. This helps protect the speed and performance of your website.
If you are getting this error, the first thing we recommend is to check the file extension to make sure it is correct. Sometimes you can accidentally delete a filename extension or type it incorrectly while editing or saving a file on your computer.
You can easily check file extensions on Windows 10. Just open the folder that contains your file and click the “View” link at the top of the window. From here you need to check the “File name extensions” box.
After checking this box, the extension will appear after the file names.
Note: This will display the extension for all files on your computer, not just the files in that folder.
Mac users can view file extensions by opening the Finder app and going Finer »settings from the top menu.
This will bring up the Settings pop-up where you need to click the Advanced tab and make sure the box next to the “Show all file name extensions” option is selected.
After viewing the file name extensions, find the file you wanted to upload and make sure it has the correct extension.
If the extension is wrong, you can just right click and select the Rename option to change the filename and add the correct extension.
Allow new file types in WordPress with the File Upload Types plugin
If you upload a file type that is not supported by WordPress, you can still upload it by adding it as a supported file type.
The “File upload types” plugin is the easiest way to fix the error “This file type is not allowed for security reasons”. This was co-shaped by the founder of WPBeginner, Syed Balkhi.
First you have to install and activate the File Upload Types plugin. For more information, see our step-by-step guide to installing a WordPress plugin.
After activation, go to Settings »File Upload Types Page in your WordPress admin area. Then just enter your file type in the search box.
Next, check the box next to the file types you want to enable and click the “Save Settings” button at the bottom of the screen to save your changes.
Now return to the media library. You can add your file (s) without getting an error message.
Keep your WordPress site secure by allowing additional file types
The reason WordPress blocks a lot of file types is to keep your WordPress website secure.
If you enable additional file types, we strongly recommend that you take some security measures to protect your site.
We hope this article has helped you resolve the “This file type is not allowed for security reasons” error in WordPress. You might also want to see our expert pick of the top WordPress plugins for your website and bookmark our ultimate guide on how to fix the most common WordPress errors.
If you enjoyed this article, please subscribe to our YouTube channel for WordPress video tutorials. You can also find us on Twitter and Facebook.