How to Fix the “File Type Not Permitted” Error in WordPress

File Type is Not Permitted
How to Fix the “File Type Not Permitted” Error in WordPress

WordPress: How to Correct 'Sorry, This File Type Is Not Permitted for Security Reasons' Error. Have you ever attempted to submit a file to WordPress only to have this notice show? Particularly when you are working on something significant, it is aggravating. Still, don't fret; this is rather a frequent mistake that is easily corrected.

What Does This Error Suggest?

A few file types are blocked by incorrect WordPress. It does this to guard your website from dangerous files. This mistake will appear if the file you are uploading is not on the approved WordPress list.

WordPress, for instance, lets files like:

  • .jpg, .png (images)
  • .pdf (files)
  • .mp4 (videos)

But if you try to upload a .svg or .psd file, you might make a mistake.

  • Usual Causes of the Problem
  • Possible causes include these:
  • You're posting a file that hasn't been approved.
  • Uploads are being limited by a plugin
  • It is being described by WordPress in several settings.

Let's correct it right now.

Method 1: Using a plugin is one of the simplest methods

  • First step: Visit your WordPress dashboard.
  • Step 2: Go to Add New among Plugins.
  • Step 3: See WP more File Types.
  • Step 4: Install and activate the plugin.
  • Step 5: Go to Settings > Extra File Types.
  • Step 6: Mark the check box next to the file type you want to permit.
  • Step 7: Save changes.

Upload your file once more. Now it should operate.

Method 2: Modify your wpconfig.php file

This approach is more sophisticated. Start with backing up your website.

  • First, open your website files using File Manager or FTP.
  • Step 2: Locate the file wp-config.php.
  • Step 3: Include this code line:

    define('ALLOW_UNFILTERED_UPLOADS', true);
  • Fourth step: Save the document and upload it back.

Only use this technique if you have faith in the source of the document.

Method 3: Utilize a Code Snippet in functions.php

  • You can enable particular file types if you are at ease with the code.
  • First, visit the theme
  • Choose the file functions.php
  • Third step: Include this code snippet:
add_filter( 'upload_mimes', 'custom_mime_types' );

Step 4: Save the changes

Step 5: Re-upload your file now.

You can replace 'svg' with other file types you need.

Method 4: Look for plugin conflicts

Plugins occasionally create this fault.

  • Step 1: Deactivate all your plugins.
  • Step 2: Try uploading the file.
  • Step three: Reactivate your plugins one at a time if it succeeds.
  • Step 4: Replace or update the one responsible for the problem.
  • Way 5: Convert the File

Should none of the foregoing techniques succeed, attempt to convert the file.

For instance:

  • Change .svg to .png.
  • Change .psd to .jpg
  • For this, you can use free online resources. After that, load the new file.
  • Last Advice for Secure Uploads
  • Post only files from reliable sources.
  • Maintain the up-to-date nature of your plugins and WordPress.
  • Avoid using unverified plugins to enable file types.
  • Scan your website for malware frequently.

You’ll probably find our article on WordPress 500 Internal Server Errors rapidly helpful too.

At last

Although boosting "Sorry for WordPress, this file type is not allowed for security reasons" error is smooth.

There are many secure choices, whether you add code or use a plugin.

Always select the ways that correct your peaceful level. Using the appropriate actions, you may upload any necessary file stress-free.

Related Solutions