Are you trying to upload a record in your WordPress Media Library simplest to be met with a message telling you “Sorry, This File Type Is Not Permitted for Security Reasons” and/or “[filename] has did not add”?
Try an unfastened demo
As the message implies, WordPress limits the sorts of files that you could add to your website for safety reasons. However, by using adding a small code snippet to your web page’s wp-config. Hypertext Preprocessor document or the use of an unfastened plugin, you may manually expand the listing of allowed document kinds so you’re capable of adding any type of file.
What Triggers the “Sorry, this file type is not permitted for security reasons” Message?
By default, the file types that you can upload are:
- .ppt, .pptx, .pps, .ppsx
- .xls, .xlsx
If you’re trying to upload a file type that’s not on the list above, you’re likely going to run into the “Sorry, this file type is not permitted for security reasons” error. Or, you’ll also see it as “[filename] has failed to upload”.
Are you trying to upload a file on WordPress and keep getting the ‘Sorry, This File Type Is Not Permitted for Security Reasons’ error? Learn how to fix it!
For example, in case you’re trying to use your very own custom fonts for your WordPress website, you might be seeking to upload a custom font file to WordPress.Tff and/or.Woff formats. Because those formats are not allowed by way of default, WordPress will display you the “Sorry, This File Type Is Not Permitted for Security Reasons ” blunders rather than letting you upload them.
Here’s an instance where we tried to upload a . Woff record to our test website online:
How to Fix the “Sorry, this file type is not permitted for security reasons” Error in WordPress
Below, we’ll display you ways how to fix the “Sorry, this file type is not permitted for security reasons” errors in WordPress:
1.) By enhancing your web page’s wp-config.Php file
2.) By using a free WordPress plugin
1. Add New Permitted File Types Using wp-config.php
WordPress consists of an ALLOW_UNFILTERED_UPLOADS option that you may allow on your site’s wp-config. Personal home page file. Once enabled, you’ll be capable of add any document kind for your WordPress Media Library.
Here’s how to set it up however first, due to the fact you’ll be editing your wp-config.Php file, we’d suggest backing up your website earlier than proceeding.
To get started, connect with your WordPress website through FTP/SFTP. Your website online’s wp-config. The personal home page file is located in the root folder, which is the same folder that has the wp-admin and wp-includes of folders.
Add the below line
Make positive to save your changes and re-add the record if wished.
To finish the system, you’ll want to go to your WordPress dashboard and log out of your WordPress account. Then, you may straight away log again in.
After you’ve logged out/in, you must be capable of upload any file without triggering the error message:
2. Use the Free WP Extra File Types Plugin
If you’d decide on no longer to edit your wp-config.Hypertext Preprocessor document and/otherwise you want more control over precisely which record kinds may be uploaded to your site, you may use the loose WP Extra File Types plugin at WordPress.Org
Once you put in and activate the plugin, visit Settings ? Extra File Types in your WordPress dashboard.
There, you’ll see a prolonged listing of record sorts. Check the container subsequent to the document type(s) which you need a good way to add and then click Save Changes at the bottom:
If you don’t see the report kind that you’d like to add to the listing, you could also upload your very own custom record types at the bottom of the plugin‘s settings listing:
By default, WordPress limits the record types that you may add to your site for security reasons. If you try to add a record kind out of doors this listing of default report types, you’ll see the “Sorry, this file type is not permitted for security reasons.” message.
One manner to fix the problem is to edit your wp-config. Personal home page record and upload the ALLOW_UNFILTERED_UPLOADS code snippet to permit unfiltered uploads. Or, you can also use the loose WP Extra File Types plugin to manipulate allowed document kinds from your WordPress dashboard.