Resolving the “Sorry, this file type is not permitted for security reasons” Issue in WordPress
Introduction
Have you ever encountered the frustrating “Sorry, this file type is not permitted for security reasons” error when trying to upload a file on your WordPress website? This error message is commonly displayed when you attempt to upload a file type that is not supported by WordPress. In this article, we will guide you through the process of fixing this error and successfully uploading files on your WordPress site.
Understanding the Error Message
The “Sorry, this file type is not permitted for security reasons” error occurs when you try to upload a file that is not supported by WordPress. This error can often be seen when adding a new file to your Media Library. It may also appear as “Sorry, you are not allowed to upload this file type.”
For security reasons, WordPress restricts the types of files that can be uploaded through the dashboard. Only common image, video, document, and audio formats are supported. However, there are solutions available to bypass this restriction and upload unsupported file types.
Fixing the Error: Checking the File Extension
One common reason for encountering the file type error is an incorrect file extension. File extensions are the suffixes at the end of file names, indicating the file type. For example, in the file name “holidayphoto.png,” “holidayphoto” is the name and “png” is the extension.
To check file extensions on Windows, follow these steps:
- Open the folder containing the file.
- Click on the “View” link at the top of the window.
- Make sure that the “File name extensions” box is checked.
- You will now see the file extensions alongside the file names.
Mac users can view file extensions by following these steps:
- Open the Finder app.
- Go to Finder » Settings or Finder » Preferences from the top menu.
- Click on the “Advanced” tab in the Preferences popup.
- Ensure that the box next to “Show all filename extensions” is checked.
If you find that the file extension is incorrect, you can right-click on the file, select “Rename,” and add the correct extension.
Uploading Unsupported File Types
If you need to upload file types that are not supported by WordPress, there are plugins and methods available to make it possible.
Using the Allow File Upload Types Plugin
The Allow File Upload Types plugin, developed by WPBeginner’s founder Syed Balkhi, provides a simple solution to resolve the file type error. Here’s how you can use the plugin:
- Install and activate the Allow File Upload Types plugin.
- Go to “Settings” » “Allow File Upload Types” in your WordPress admin area.
- Enter the file type you want to enable in the search box.
- Check the box next to the desired file type(s) to enable them.
- Click “Save Settings” to apply the changes.
With the Allow File Upload Types plugin, you can now upload unsupported file types without encountering the error.
Specifying Allowed File Types Manually with WPCode
Another method to allow unsupported file types in WordPress is by using WPCode, a powerful code plugin. WPCode enables you to insert code snippets into your site without directly editing the theme’s functions.php file. Here’s how you can use WPCode to enable SVG file uploads:
- Install and activate the WPCode plugin.
- Use the WPCode code snippet for allowing SVG file uploads. Refer to our guide on how to add SVG image files in WordPress for detailed instructions.
By employing these methods, you can enable additional file types on your WordPress site. However, it’s crucial to note that certain file types are blocked by WordPress for security reasons. When allowing additional file types, ensure you take precautionary measures to maintain the security of your WordPress website. Consider keeping WordPress, plugins, and themes up to date, regularly backing up your site, using strong passwords and two-factor authentication, and installing a security plugin to protect against malicious threats.
Conclusion
The “Sorry, this file type is not permitted for security reasons” error can be frustrating, but with the right solutions, you can successfully upload unsupported file types on your WordPress site. Double-checking file extensions, utilizing plugins like Allow File Upload Types, or leveraging methods like WPCode can help you overcome this error. Remember to prioritize the security of your website by implementing necessary precautions. For more WordPress tips and tricks, subscribe to our YouTube Channel and follow us on Twitter and Facebook.