When attempting to upload a file to the WordPress media library, encountering the frustrating error message, ‘Sorry, this file type not permitted for security reasons,’ is not uncommon. This issue arises when the file you’re attempting to upload isn’t compatible with WordPress. However, as a leading software consultancy in Kakkanadu Ernakulam, (Kochi), we recognize the significance of seamless file management within the WordPress ecosystem. Fear not – even if your desired file format isn’t typically supported by WordPress, solutions exist. By strategically adjusting specific WordPress settings or leveraging reliable plugins, our expert team ensures that you can successfully upload files, surpassing the default security limitations. These tailored solutions align perfectly with our commitment to providing comprehensive software consultancy services. If you’re facing challenges with file uploads on your WordPress platform, consider implementing these strategies to enhance the versatility of your media library, showcasing the expertise and dedication synonymous with our software consultancy services in Kakkanadu, Ernakulam (Kochi).

How to fix “Sorry, This File Type Is Not Permitted for Security Reasons” error
Double-Check the File Type Extension Spelling
Sometimes, you might see the ‘Sorry, this file type is not allowed for security reasons’ message even when you’re trying to upload allowed file types. This can happen if the file’s name extension is spelled wrong or has been changed accidentally, so WordPress can’t recognize it. Before you try other ways to fix it, make sure the file extensions are correct. Here’s how to do it on Windows:
- Open File Explorer and find the file you want to upload.
- Go to the top menu and select ‘View.’
- Check the box that says ‘File name extensions.

If you see that the file extension is wrong, you can fix it by right-clicking on the file and choosing ‘Rename.’ Change it to the correct extension. If you’re using a Mac, you can do something similar. Go to Finder → Preferences → Advanced and check ‘Show all filename extensions.’ After you’ve fixed the extension and re-upload the file with the right one, the ‘Sorry, this file type is not allowed for security reasons’ error should be resolved. If the issue continues, you can try other ways to fix it.
Adjust the WordPress Multisite Configuration
WordPress Multisite allows users to make and oversee several websites using one dashboard. It also has a feature that lets you add allowed file types:
- Open the WordPress dashboard.
- Go to My Sites → Network Admin → Settings → Network Settings in the top menu.
- Scroll down to Upload Settings.
- In the box next to ‘Upload file types,’ enter the extensions you want to allow.
- Save your changes.

Remember, this approach is only effective when you’ve turned on WordPress Multisite. And even with it, you can only add specific file types like .tiff and .midi
Edit the wp-config.php File
By modifying the wp-config.php file, you can enable the upload of various file types to the media library, even those not typically supported. However, because you’ll be making changes to a system file, it’s crucial to create a backup of your website first, just in case any problems arise. To begin, access the WordPress installation directory using an FTP client or File Manager.
If you use Hostinger web hosting, follow these steps:
- Go to hPanel → Files → File Manager.

- Open the public_html folder and access the wp-config.php file.

- Insert the following piece of code before the line that says ‘That’s all, stop editing! Happy publishing:
define(‘ALLOW_UNFILTERED_UPLOADS’, true);
- Save the changes.

Remember, using this method can make your site less secure. That’s why we suggest undoing any changes after you’ve uploaded the file type that’s typically not allowed to your WordPress site.
Edit the Theme’s functions.php File
If you find the previous method too risky, you can try a safer option by adding the ‘upload mimes filter’ to your theme’s functions.php file. This way, you can allow specific file types one by one instead of all at once. Here’s how to do it using hPanel:
- Head to Files → File Manager.
- Navigate to public_html → wp-content → themes, access your current theme’s folder, and then open the functions.php file.

- Paste the following syntax to the file. Under the line // Add new MIME types here, replace [‘gpx’] = ‘text/gpsxml’ with your preferred Multipurpose Internet Mail Extensions or MIME types:
function my_custom_mime_types( $mimes ) {
// Add new MIME types here
$mimes[‘gpx’] = ‘text/gpsxml’;
return $mimes;
}
add_filter( ‘upload_mimes’, ‘my_custom_mime_types’ );
- Save the changes.
![Adding MIME values as ($mimes[‘gpx’] = ‘text/gpsxml’)](https://dieutek.com/wp-content/uploads/2023/11/7b8.jpg)
It’s important to know that different operating systems may use different versions of the same file type, which means they have different MIME values. For example, a .gpx file on Windows might appear as .gpsxml on macOS. So, if you’re on macOS, instead of using $mimes[‘gpx’] = ‘text/gpsxml’;, use $mimes[‘gpx’] = ‘application/gpsxml’;.
Add Permitted File Types Using a WordPress Plugin
WordPress has plenty of plugins for uploading unsupported file types. They let you add many MIME types that are disabled by the media library. For this tutorial, we will show you how to fix the “Sorry, this file type is not permitted for security reasons” error using the WP Add Mime Types free WordPress plugin:
- 1. Go to your WordPress admin area, install the plugin, and activate it.
- 2. Then, go to Settings → Mime Type Settings.
- 3. In the ‘Add Values’ part, type in the MIME type value for the file you want to upload. For instance, if you’re uploading a .woff file, you need to enter ‘woff = application/x-font-woff.’ If you want to add more than one MIME file type, just press Enter between each value.
- 4. Finally, click on the ‘Save’ button to save your changes.

After you’ve done this, the new MIME types will show up in the allowed list, and you can upload the files without any problems.

Get in Touch with Your Hosting Provider
Sometimes, it’s not WordPress that’s blocking you from uploading certain files. Some hosting providers have restrictions on file types to keep things secure. So, if none of the methods mentioned earlier work, get in touch with your hosting provider’s support team. Ask them to help you with this issue. For Hostinger users, you can reach out to our Customer Success team using live chat:
- 1. Open hPanel and go to Help.
- 2. Choose ‘Transfer, setup, or restore your site’ → ‘Install new application.’
- 3. Click on ‘Chat now.

When the live chat window opens, just type your request, and our Customer Success team will respond within a few minutes.
Modify Approved File Types Using a Plugin
There are a few plugins that can help you upload file types that are normally not allowed. Examples of such plugins are File Manager and Enhanced Media Library. These plugins come with settings that let you add approved Multipurpose Internet Mail Extensions (MIME) types for uploading in WordPress. A MIME type is like a label that tells your browser what kind of content is in a file and how to display it properly. For instance, a file with the .jpg extension has the MIME type image/jpeg, and web browsers recognize it as an image. We’ll use the Enhanced Media Library plugin to add new approved MIME types for uploading. You can easily install and activate this plugin in the Plugins section of your WordPress site.

Once the plugin is turned on, we’ll head to our settings and find an option called ‘MIME Types > Media:

There are two ways to allow uploads for a specific MIME type. The first way is to check the box next to the MIME type you want under the ‘Allow Upload’ column. But if the type you want isn’t listed, you’ll need to choose ‘Add New MIME Type’ at the top of the page.

This will add a new row where you can enter the extension, MIME type, and labels. Next, select the Allow Upload box for the new MIME type. If you ever change your mind, you can remove entries by using the button at the end of each row, or select Restore WordPress default MIME Types for the original settings.
Change File Types Allowed by Editing Your Theme’s functions.php File Using the Upload_Mimes Filter
Alternatively, you can manually adjust the allowed file types on your website. To do this, you’ll need to access the functions.php file in your theme and use a WordPress function called a ‘filter.’ The functions.php file controls how your WordPress site behaves or functions. In WordPress, you can use filters to change how the platform normally works. When you add the ‘upload_mimes’ filter to functions.php, you’re altering how WordPress handles files that are not typically allowed.
Here’s how to do it:
- Start by creating a backup of your website. This ensures that if anything goes wrong while you’re making changes to important site files, you can restore it.
- Next, access your functions.php file through FTP using an FTP client like FileZilla. Once you’re connected to your site’s server, you can locate the functions.php file within your theme’s folder found in the ‘wp-content’ directory.
- Right-click on the file and choose ‘View/Edit.

The file will open in your text editor, and you can insert the following code:
| 01
02 03 04 05 06 07 08 09 10 11 12 13 |
function my_custom_mime_types( $mimes ) {
// New allowed mime types. $mimes[‘svg’] = ‘image/svg+xml’; $mimes[‘svgz’] = ‘image/svg+xml’; $mimes[‘doc’] = ‘application/msword’;
// Optional. Remove a mime type. unset( $mimes[‘exe’] );
return $mimes; } add_filter( ‘upload_mimes’, ‘my_custom_mime_types’ ); |
You can include the MIME types you want and their matching extensions in the array. If there are MIME types you want to forbid, you can also add them to the ‘Remove a mime type’ section, or delete them if they’re not needed. This way, you can decide which MIME types are allowed, giving you control over what gets uploaded to your site and helping to prevent vulnerabilities related to file uploads. Don’t forget to save your changes when you’re done editing.
Enable Unrestricted Uploads in Your wp-config.php File
If you want to permit all types of files to be uploaded, you can make this change in the wp-config.php file, which holds information about your site’s database. Like before, it’s important to create a backup of your site in case anything goes wrong during the editing process. Then, follow the same FTP method we mentioned earlier to access the wp-config.php file. You can find this file in the main directory of your website. Right-click on it and choose ‘View/Edit’ to open it in a text editor.

You can insert the following code into the file anywhere before the line that says ‘/* That’s all, stop editing. Happy blogging. */’:
define(‘ALLOW_UNFILTERED_UPLOADS’, true);
Don’t forget to save your changes once you’re done editing. Keep in mind that enabling this option removes any restrictions on file uploads, so you and others can upload potentially harmful files to your site, whether intentionally or by mistake. It’s a good idea to explore alternative solutions before using this one.
Use the Free WP Extra File Types Plugin
If you don’t want to edit the wp-config.php file or if you want to have precise control over which file types can be uploaded to your site, you can use a free plugin called WP Extra File Types available at WordPress.org.
Here’s how to do it:
- 1. Install and activate the plugin.
- 2. In your WordPress dashboard, go to Settings → Extra File Types.
- 3. You’ll find a long list of file types there. Check the box next to the file type(s) you want to allow for uploading.
- 4. Finally, click ‘Save Changes‘ at the bottom.

If the file type you want to upload isn’t on the list, you can also create your own custom file types at the bottom of the plugin’s settings.

How We Can Support You?
With our roots firmly in Kakkanadu, Ernakulam ( Kochi ) and with over 12 years of experience, we have established ourselves as a leading force in the IT industry, providing tailored services that are both advanced and reliable.
Whether you’re initiating a new project, require assistance with existing systems, or need expert IT consultation, we’re your dedicated collaborators in achieving success. Our services extend beyond development; we are your partners in progress. Our solutions are tailored to align with your unique objectives, and we work closely with you to transform your vision into reality.
Contact us for all your IT-related needs, be it Website Development, Software Development, Mobile App Development, or expert consultation. Together, we can harness technology’s potential to reach greater heights.
Frequently asked questions
Dieutek Developments is located in Kakkanadu, Ernakulam (Kochi), with over a decade of experience in delivering high-quality IT solutions.
Dieutek Developments provides a comprehensive range of IT services, including custom software development, website redesign,website development, ecommerce store development, web and mobile app development, and digital marketing.
Yes, Dieutek Developments specializes in custom software development, utilizing various technologies such as WordPress, PHP-based frameworks like Laravel and Zend, and JavaScript frameworks like React and Node.js to create robust and scalable web applications.
Certainly, Dieutek Developments offers concept-to-completion website redesign,website development, and website redesign services to cater to clients’ specific needs.
Dieutek Developments excels in building ecommerce stores, providing customization options and expertise in integrating various platforms and tools, along with payment gateway integration both domestically and internationally.
Yes, Dieutek Developments offers mobile app development, services for Android, iOS, Flutter, and hybrid platforms.
Absolutely, Dieutek Developments offers IT consultation services to assist clients in Kakkanadu, Ernakulam (Kochi), in aligning their IT strategies with their business goals.
Dieutek Developments has expertise in various industries, including Healthcare, Retail, E-commerce, Restaurants, Church, Education, NGO, Travel & Tourism, and Entertainment, providing tailored IT solutions for each sector.
Dieutek Developments boasts a team of 35+ professionals with over 13 years of experience in the IT industry, based in Kakkanadu, Ernakulam (Kochi).
To get in touch with Dieutek Developments for sales and business development queries, you can contact us at +91 7012287156.
Conclusion
To effectively address the persistent “Sorry, This File Type Is Not Permitted for Security Reasons” error in WordPress, our expert software consultancy services based in Kakkanadu, Ernakulam (Kochi), recommend several strategic solutions. First, meticulously examine and rectify file type extensions to ensure compatibility with WordPress standards. For those navigating Multisite configurations, make targeted adjustments in settings to harmonize file uploads seamlessly.
For advanced users, consider delving into the wp-config.php or functions.php file to fine-tune your WordPress setup for optimal file compatibility. Alternatively, leverage user-friendly plugins such as “WP Add Mime Types” or “WP Extra File Types” to streamline the process without delving into intricate coding.
Our software consultancy expertise ensures that you can choose the method that best aligns with your specific needs and security preferences. If challenges persist, don’t hesitate to reach out to your hosting provider for dedicated assistance. Trust our Kakkanadu, Ernakulam (Kochi) – based software development company to empower your WordPress experience with tailored solutions, embodying the pinnacle of software consultancy services.


