File type not Valid

How to fix the ‘Sorry, this type of file is not valid for security reasons’ in WordPress?

You may be creating a website that allows users to download files, or you may want to add a downloadable file to their email form.

However, you’ll soon find that WordPress doesn’t really like it when you download certain types of files. If you try to download a file that you don’t like About Press, you’ll receive a “Sorry, this type of file is not safe.”

Fortunately, there is an easy solution to this problem, and we will be talking to your step by step about it.

What does “Sorry, this type of file is not acceptable for security reasons” mean?

First of all, this is a common mistake for most Bloggers and WordPress users. So don’t be scared and don’t panic. The problem can also be easily solved. WordPress’s system is to blame for this error.

Type of file is not acceptable for security reasons
Type of file is not acceptable for security reasons

Although WordPress is a content management system, it still has a very strict filtering system that allows only a few types of files to be accepted into the system.

And if you try to download a file that isn’t on the WordPress support list, you’ll run into a “Sorry, this type of file is not acceptable for security reasons.”

What causes this error?

As you know, there are many different types of files used by different types of applications, for example. AI is a very common type of file used by Adobe Illustrator.

This type of file is widely used by designers and illustrators to preserve and share their works. But don’t be surprised if you try to download the file. AI in WordPress appears with the “Sorry, this type of file is not valid for security reasons” because this type of file is not on the WordPress supported file list.

This is a complete list of the types of files that Are Allowed in WordPress by default. Surprisingly, WordPress still doesn’t support popular and common file types, such as Illustrator, by default. And this is just one of the dozens of types of files that WordPress still does not support.

So yes, this time, you can accuse WordPress of having led you through this confusing error. But you can fix this problem manually to download any file you want.

How to fix the bug?

There are two simple ways to fix the “Sorry, this type of file is not acceptable for security reasons.” One method requires the use of a plugin, and the other requires editing the main WordPress file.

Before you go any further, we strongly recommend you back up your site. If you don’t have a backup system yet, you can customize it with a free plugin.

Method 1: Use the Mime Types plugin

There are several MIME-types plugins that will help you add your file types to the List of Supported WordPress Files, such as Pro Mime Types, Mime Types Extended, and Unsafe Mimetypes. Unfortunately, most of these plugins are out of date.

WP Add Mime Types plugin
WP Add Mime Types plugin

We use the WP Add Mime Types plugin for this article because it has been updated to support WordPress’s latest versions. Feel free to try and use another plugin if you like.

  • Step 1: Installing the WP Add Mime Types plugin To install the plugin, log in to your WordPress dashboard, and go to the Plug-ins section to add a new one. Find the WP Add Mime Types plugin and click “Install” and then “Activate” to turn on the plugin.
  • Step 2: Set up a plugin Once installed, a new page called Mime Type Settings will appear on the settings page. On this page, you can add certain types of files to add them to WordPress. Find the type of file you want to add and copy and paste it in the Values box. Make sure you’ve copied the entire line associated with the file type extension you’re trying to add. Then click Save to save the changes. Once the file type is on, it will be highlighted in red in the list.

The only problem with this method is that even MIME-types plugins have limitations when adding certain types of files. For example, the plugin doesn’t allow you to download files. Ai. But the second way is to avoid this problem and download any file you want.

Method 2: Edit the wp-config file

wp-config.php is the main file used by WordPress, which handles many WordPress functions. You can edit this file to disable the system that prevents certain types of files from being downloaded. You can then download any type of file.

  • Step 1: Access to your server You can edit the wp-config file using the FTP client app or log into your CPanel server and use the File Manager. Go to the general folder where your WordPress website is located and where all the basic WordPress files are located.
  • Step 2: Edit wp-config.php Then open and edit the wp-config file. As soon as you open the file, just find the line / That’s all, stop editing! Happy blogging. */. Then insert the next line of code directly above it.
    define ('ALLOW_UNFILTERED_UPLOADS', true);

Still, getting the same mistake?

The above methods should help you download almost any type of file you want in WordPress. However, if you are still getting the same bug, you should try to contact your hosting provider and ask for help.

How to fix the ‘Sorry, this type of file is not valid for security reasons’ in WordPress? - WP inCareClick To Tweet

Some sites prohibit certain types of files from being downloaded for security reasons. If you continue to receive an error message and desperately need to download a file to WordPress, contact the hosting provider’s support team to see if they have filters that prevent you from downloading files.

What we do Best

WordPress
Maintenance
you Need!

WordPress Updates

Security Checks

Daily Cloud Backups

Speed Optimization

Premium Plugins

Developer Consultation

Leave a Comment

Your email address will not be published. Required fields are marked *