Javascript required
Skip to content Skip to sidebar Skip to footer

New Wordpress Version Wont Allow Me to Upload Images or Audios for Security Reasons

How to Prepare "Lamentable, This File Blazon Is Not Permitted for Security Reasons" WordPress Fault

How to Fix

When uploading a file to your WordPress media library, you might encounter the "Pitiful, this file type is not permitted for security reasons" error.

Even though this is a common error message, receiving information technology can be frustrating – especially if yous're sure that the file you're trying to upload is not a threat to your WordPress site security.

Download WordPress Crook Sheet

Fortunately, the "Sad, this file blazon is non permitted for security reasons" mistake is solvable. This article volition explain why this mistake message appears and how to fix it in five dissimilar ways.

Why Does The "Sorry, This File Type Is Non Permitted for Security Reasons" Error Occur?

WordPress permits users to upload images, documents, audio, and video in these popular file types:

  • Images: .jpeg, .jpg, .png, .gif, .ico
  • Documents: .pdf, .doc, .docx, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx, .psd
  • Audio: .mp3, .m4a, .ogg, .wav
  • Video: .mp4, .m4v, .mov, .wmv, .avi, .mpg, .ogv, .3gp, .3g2

Any file outside the permitted file types tin't be uploaded to the media library by default. Yous will get the "Distressing, this file blazon is not permitted for security reasons" error in WordPress when y'all endeavour to upload them.

For case, you lot can't upload a .epub or a .woff file without making some configurations first.

Screenshot of WordPress dashboard showing "this file type is not permitted for security reasons" error.

Only assuasive certain file types minimizes the risks of a security breach due to potentially malicious files.

If you're non careful, such dangerous files can make their fashion into your WordPress site – whether accidentally or purposefully – and betrayal your site'south vulnerabilities. This can damage your site or give hackers access to your sensitive data.

Fixing "Sorry, This File Type Is Not Permitted for Security Reasons" Fault

Although WordPress' reason behind limiting file types is well-intentioned, it poses a problem for users who desire to share specific files on their website.

In this section, we'll explain five different means to set the "Sorry, this file blazon is non permitted for security reasons" fault in WordPress.

1. Double-Checking the File Type

In some cases, the file you desire to upload falls inside WordPress' listing of permitted file types, notwithstanding you lot still get the "Sad, this file blazon is not permitted for security reasons" fault.

It'due south possible that the file proper name extension was misspelled or accidentally changed, making the file unrecognizable to WordPress. And then before trying any other method, brand sure that the file extension is correct.

Window showing an incorrect file name extension - .jpq instead of .jpg.

If you're using Windows, go to the location of your file on Windows Explorer. From the carte, select the View tab and check File name extensions.

Now you can view and edit the extension of all files. For case, if you notice that the file's extension is misspelled, right-click on the file and Rename it to the correct one.

Window showing the picture after its  file name extension has been fixed.

The process is similar if you're using a Mac – you'll need to head to Finder -> Preferences -> Avant-garde and enable Testify all filename extensions.

If the file type is permitted past WordPress, re-uploading it with the correct extension should solve the "Sorry, this file blazon is not permitted for security reasons" error message. However, if the file extension is correctly spelled and isn't permitted by WordPress, try the other methods.

2. Using a WordPress Plugin

WordPress has plenty of WordPress plugins that tin can assistance y'all upload unsupported file types. These plugins allow you lot enable many Multipurpose Internet Mail service Extensions (MIME) types disabled by the media library.

This step-by-step tutorial will testify yous how to fix the "Pitiful, this file type is non permitted for security reasons" mistake using the free plugin WP Add Mime Types.

  1. From the WordPress admin area, install the plugin and activate information technology.
  2. Navigate to Settings -> Mime Blazon Settings.
  3. In the Add Values section, enter the right MIME type value for the file y'all desire to add together. For instance, if you're going to upload a .woff file, enter woff = application/x-font-woff . To add multiple MIME file types, separate each value with Enter.
WordPress dashboard screenshot showing how to add multiple MIME file types in the Add Values section.
  1. Click Salvage. If the process is successful, the new MIME type should appear in the permitted listing, and you'll be able to re-upload the file with no issue.
Screenshot of WordPress dashboard showing that the media file was uploaded successfully.

3. Editing wp-config.php File

Editing your site'southward wp-config.php file can allow you lot to upload all file types to the media library, including unsupported ones. Notwithstanding, proceed in mind that this method will make your WordPress website less secure.

Nosotros advise you lot to revert any changes made in one case you have uploaded the unsupported file.

Likewise, considering you'll be editing a system file, brand sure to create a backup of your site before proceeding in case something goes wrong.

  1. Access your WordPress installation directory via an FTP customer or File Director. If you utilise Hostinger, open hPanel and navigate to Files -> File Manager.
The File Manager on Hostinger's hPanel
  1. Open up the public_html folder and open up the wp-config.php file.
Screenshot of the File Manager showing where to find public_html and wp-config.php files.
  1. Paste the following code snippet to a higher place the line that says That'due south all, stop editing! Happy publishing. And then, Salvage your changes.
define('ALLOW_UNFILTERED_UPLOADS', true);
Screenshot of wp-config.php file showing where to paste the code.

four. Editing the Theme's functions.php File

If the wp-config.php file method feels likewise risky, adding the upload_mimes filter to your theme's functions.php file might be a better culling. This method enables certain file types individually instead of all of them simultaneously. Upon backing up your site, follow these steps:

  1. Access your WordPress installation directory via an FTP client or File Manager.
  2. Navigate to wp-content -> themes, admission your current theme'south folder and open up the functions.php file.
Screenshot of the File Manager showing where to find the functions.php file.
  1. Paste the following syntax in the file. Feel free to add your desired MIME types under the // Add together new MIME types here line. Salve the changes.

function my_custom_mime_types( $mimes ) {
// Add together new MIME types here
$mimes['gpx'] = 'text/gpsxml';
return $mimes;
}

Screenshot of the functions.php file showing where to paste the syntax.

Keep in mind that different operating systems utilise different versions of a similar file blazon, making their MIME values equally different.

For instance, .gpx files on Windows are .gpsxml on macOS. So, instead of $mimes['gpx'] = 'text/gpsxml'; add together $mimes['gpx'] = 'application/gpsxml'; on macOS.

5. Contacting Your Hosting Provider

Sometimes WordPress isn't the simply thing stopping you from uploading specific files. Several hosting providers enact file blazon restrictions to ensure security.

And then, if none of the methods we take offered are working, contact your hosting provider'southward back up team and ask them to prepare the issue.

If you utilise Hostinger, experience free to contact our customer success squad via live chat. Open hPanel and go to Help -> Contact us.

Screenshot of Hostinger's hPanel showing how to contact the customer success team.

A live chat window will appear. Send a message, and you will soon be in touch with 1 of our customer success agents.

Boosted MIME WordPress Plugins

In add-on to WP Add Mime Types, other plugin alternatives will help you resolve the "Lamentable, this file type is not permitted for security reasons" error message as information technology lets you lot upload unsupported MIME file types to WordPress.

Yet, you should only install i MIME plugin at a time to avoid conflicting errors.

1. Media Library Assistant

Media Library Assistant logo.

Plugin Stats:

  • Downloads: 70,000+
  • Rating: 5/5
  • Notable features: MIME types management, zipper metadata custom fields, enhanced search media box.
  • Best suited for: people looking for a highly customizable media library plugin.
  • Price: free

Media Library Assistant is a customizable plugin that adds a ton of features to the media library. These include managing MIME types, adding custom fields for attachment metadata, and adding specific filters to media library searches.

To add together unpermitted file types, enable the MIME types present in the plugin's settings or add custom ones.

The pregnant reward of this plugin is its extensive customization options. Users tin set the interface and functionality of the WordPress media library to their preference.

While the abundance of options tin exist overwhelming for some, if customization is essential, this plugin is an first-class pick.

DOWNLOAD

2. Enhanced Media Library

Enhanced Media Library logo.

Plugin Stats:

  • Downloads: 100,000+
  • Rating: 4.5/five
  • Notable features: MIME types, paradigm size, and prototype taxonomies management
  • Best suited for: people looking for a media library plugin with a simple interface
  • Price: freemium

Enhanced Media Library is an easy-to-use plugin to add and edit MIME types, arrange image sizes, and manage image taxonomies in your media library.

To add MIME types, simply go to the plugin'due south settings and check Permit Upload next to the MIME types yous desire to enable in the media library. If the MIME blazon you want doesn't announced in the list, feel free to add custom ones, too.

Suppose you desire more features like unlimited media categories/tags and advanced media library search filters. In that case, there'south a premium version of the plugin that costs $25 for a lifetime license and supports WordPress multisite.

DOWNLOAD

3. File Upload Types

File Upload Types logo.

Plugin Stats:

  • Downloads: 8,000+
  • Rating: v/5
  • Notable features: MIME types management
  • Best suited for: those looking for a plugin for MIME types management simply
  • Price: free

File Upload Types is a plugin for enabling file types outside of WordPress'southward whitelist. Even though it lacks additional features, it'southward sufficient for those that only desire to manage allowed MIME types on their WordPress media library.

Upon installation and activation, permit a particular file type to navigate the plugins' settings and check the box adjacent to a file blazon tabular array. If you can't find the file blazon you're looking for, add a custom file type in the provided fields.

DOWNLOAD

Conclusion

The "Sorry, this file type is not permitted for security reasons" error message will announced if you try to upload file types that WordPress doesn't permit past default.

Even though this is a well-significant restriction, information technology makes it a problem for users who want to share the files they want.

In this guide, we've explained five different workarounds for this error:

  1. Double-checking the file type
  2. Using a WordPress plugin
  3. Editing wp-config.php file
  4. Editing the theme's functions.php file
  5. Contacting your hosting provider

No matter which method yous choose, nosotros promise that this article helped you resolve the "Sorry, this file type is not permitted for security reasons" error bulletin in WordPress.

Author

Hasna is a Content Writer at Hostinger. With passion and cognition in tech and digital marketing, she hopes to help people solve their problems and succeed. When not writing, she enjoys live music and overanalyzing movies.

steinbergcoluseld.blogspot.com

Source: https://www.hostinger.com/tutorials/fix-sorry-this-file-type-is-not-permitted-for-security-reasons-error-in-wordpress