How to Take care of “Sorry, This File Type is Not Permitted for Stability Motives.”

How to Take care of “Sorry, This File Type is Not Permitted for Stability Motives.”
Comments Off on How to Take care of “Sorry, This File Type is Not Permitted for Stability Motives.”, 28/04/2022, by , in Wordpress

Did you encounter the dreaded “Sorry, this file variety is not permitted for security motives.” error on your WordPress site? 🤔

Never fear, it’s a frequent mistake that occurs when you are uploading a file style that WordPress does not aid. Thankfully, there is a way to bypass this restriction.

👨‍🎓 In this report, we will demonstrate you how to add limited file types by installing a plugin or generating handbook modifications on your website.

We’ll also share a fix specifically for WordPress multisite networks, although most of our fixes are centered on frequent WordPress installs.

No make any difference which approach you select, it will only just take a pair of minutes to established up, and you will be ready to deal with the “Sorry, this file kind is not permitted for protection reasons” mistake for very good.

What brings about the “Sorry, this file kind is not permitted for security explanations.” mistake?

By default, WordPress only lets you upload a restricted choice of file styles:

Document: .pdf, .doc, .docx, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx, .psdImages: .jpg, .jpeg, .png, .gif, .webp, .icoVideo: .mp4, .m4v, .mov, .wmv, .avi, .mpg, .ogv, .3gp, .3g2Audio: .mp3, .m4a, .ogg, .wav

The restriction exists to protect against hackers from exploiting data files on your web-site. 🔒️

Specific file forms like SVG are susceptible and can be corrupted easily since these file formats had been not developed with stability in brain. So if you upload them to your web-site, hackers will exploit the information to attain obtain to your website. That’s why WordPress will allow only a handful of file kinds to be uploaded to a web page.

If you consider to upload a limited file variety, it displays you the “sorry, this file kind is not permitted for stability good reasons.” mistake.

That stated, often, you may have to upload limited file types in spite of the hazards included.

In the next area, we are heading to demonstrate you how to bypass limits and upload any file type you want on your WordPress internet site. And be absolutely sure to test out the final segment, where you will discover how to hold your WordPress website protected from hackers just after enabling the add of limited file varieties. 😎

How to add restricted file varieties on your WordPress web-site?

You can upload restricted file forms on your WordPress web site by introducing a code snippet to your main WordPress data files or by setting up a plugin. If you are working a multisite, then WordPress also provides an choice to remove limits on file varieties.

But prior to we get down to repairing the trouble, consider a backup of your entire web-site. With a backup in location, you can have out modifications on your web site without the need of stress. If everything goes incorrect, you can speedily restore your site back to usual.

Use a plugin to alter WordPress file upload kinds

Applying a plugin is the easiest way to help the add of limited file kinds.

Put in and activate the free of charge File Upload Kinds plugin on your WordPress web site.

Following, go to Settings → File Upload Forms. A record of file kinds will look on the display. Decide on the kinds you want to permit.

Then, strike the Help you save Options button and check out uploading your file on your site.

file upload types by WPForms settingIntroducing file varieties to WordPress web-site

If you never see the file type that you need in the record, the plugin also allows you incorporate your individual customized file styles.

If you really do not want to set up an additional plugin on your WordPress web-site then go for the manual solutions.

Edit wp-config.php file (Make it possible for all file kinds)

Another way to help limited file forms on WordPress is to edit your site’s wp-config.php file.

However, there is an crucial caveat for this system:

If you use it, you will be enabling all file kinds at as soon as, which might not be a superior factor for your condition. If you only require to enable a one file style, we propose the guide technique in the future area, which enables for a additional qualified technique.

The wp-config file is found in your website’s root folder, i.e., the public_html folder. You can entry the file by connecting to your server via FTP or by means of cPanel File Manager if your host presents cPanel.

Here’s how it performs working with cPanel. The simple thought will be the very same for making use of FTP.

Log in into your internet hosting account and go to cPanel and select File Supervisor.

When the file supervisor opens, go to general public_html → wp-config.php. Suitable-click on on the file and select Edit.

wp-config file in publichtml folderLocating wp-config file

Then scroll down to the finish of the file and insert the next code snippet over the “/* That’s all, prevent editing! Content running a blog. */” line:


Preserve the variations.

Now, open up your web-site and log out and indication back again in. You must now be able to add limited files to your WordPress site.

editing wp-config file to remove "sorry, this file type is not permitted for security reasons." errorEditing wp-config file

Edit theme’s features.php file (Permit precise file forms)

If you’d want the handbook route but with a far more qualified technique, you can also edit your theme’s features.php file to specify which file kinds you want to permit uploading on your web page.

Alternatively, you can also use a plugin like the no cost Code Snippets plugin, which delivers a easier way of managing the types of code snippets that you increase to the capabilities.php file.

If you want to use the functions.php file specifically instead of making use of Code Snippets, it’s necessary that you established up a little one theme to start with. In any other case, your alterations will be overwritten the next time you update your theme.

Here’s how it operates to edit the functions.php file – but if you’re working with Code Snippets, all you will need to do is increase the similar code snippet through the plugin’s interface.

The features.php file is situated in the wp-material/themes folder within the folder of your little one concept. You can entry the file through FTP or cPanel File Manager.

If applying cPanel, log in into your web hosting account and go to cPanel and choose File Supervisor.

When the file supervisor opens, go to community_html → wp-content → themes. Then open the little one concept that is active on your web page and select the capabilities.php file identified inside of the folder of the topic. Suitable-click on the file and pick out Edit.

Scroll to the conclude of the capabilities.php file and include the adhering to code snippet:

function my_customized_mime_kinds( $mimes )
// New authorized mime forms.
$mimes[‘svg’] = ‘image/svg+xml’
$mimes[‘svgz’] = ‘image/svg+xml’
$mimes[‘doc’] = ‘application/msword’
// Optional. Take away a mime kind.
unset( $mimes[‘exe’] )
return $mimes

increase_filter( ‘upload_mimes’, ‘my_custom_mime_types’ )

Help you save these variations prior to exiting the file.

In the higher than code, we knowledgeable WordPress to let uploading of the svg and doc file kinds. You can modify the code and increase your preferred file type.

editing function file to remove "sorry, this file type is not permitted for security reasons." errorModifying functionality.php file

Adjust community configurations (Multisite only)

To empower the add of limited file kinds in WordPress multisite, you will need to open up your WordPress dashboard, go to Settings → Network Settings, and scroll down to the Add file form alternative.

On the right of that choice, there is an input industry. You will require to include the extension of the file you want to upload to your web-site and then preserve your options. That is it.

Change restricted data files

If none of the previously mentioned solutions have labored for some motive, you can attempt converting the file that you failed to add to your site into a file sort that isn’t restricted by WordPress.

There are numerous free of charge conversion resources that’ll enable you with the conversion like Convertio, On line-Transform, CoundConvert, and so on.

How to safe your WordPress website immediately after taking away file style limitations

Just after eradicating restrictions on file varieties, you need to have to ensure that hackers don’t exploit the information to achieve entry to your website. You can secure your website by installing a security plugin and restricting the file upload sizing.

Destructive files are major. If you stop uploading substantial files to your internet site, you cut down the odds of a potential hack attack.

To limit file upload size, put in this plugin on your web page:

Then go to Media → Boost Add Limit and choose the most affordable file dimensions.

A WordPress protection plugin will protect your website with the assist of a firewall. It’ll scan your web page on a each day foundation seeking into every nook and corner to verify for destructive information. If it finds any indicator of malware, the instrument will clean up your web-site right away.

⚠ If you don’t have a protection plugin set up on your site, check out out our assessment of the best WordPress security plugins.

Final feelings on fixing the “Sorry, this file variety is not permitted for protection reasons” mistake

WordPress restricts the types of documents that you can upload to your web site for protection reasons. When you check out to upload a file variety that isn’t allowed by WordPress, you come upon the “sorry, this file kind is not permitted for protection reasons” error.

To fix this concern, you can put in a plugin or modify the wp-config.php or capabilities.php documents to allow for the uploading of restricted file forms.

You also will need to make guaranteed that hackers really do not exploit the information to get entry to your web site. Applying a security plugin and restricting the dimension of documents that buyers add to your web page will support defend your web page.

That is it for this a person individuals! If you come upon any other problems on WordPress, check our site for tutorials on how to clear away and prevent those mistakes.

Absolutely free information
5 Essential Suggestions to Speed Up Your WordPress Internet site
Lower your loading time by even 50-80% just by following basic suggestions.


About Vikram Rout

Vikram Rout has been a blogger, digital marketer and an SEO expert at, one of the fastest growing custom design crowdsourcing platforms. Over the years, he has been helping small businesses and startups improve website design and SEO strategy, content marketing and user experience. You can engage with him on here.