How to Fix ‘Sorry, This File Type Is Not Permitted for Security Reasons’ Error in WordPress

How to Fix ‘Sorry, This File Type Is Not Permitted for Security Reasons’ Error in WordPress

Last modified: December 4, 2020

FAQ
Cloudways

When uploading a file to your WordPress website, you can sometimes be met with a message that says ‘Sorry, This File Type Is Not Permitted For Security Reasons’. This message is because WordPress does limit the types of files that you can upload to the website. This is for security reasons.

However, by adding a little code snippet to the WordPress website or using a free plugin, the types of files that can be uploaded can be changed. So, here are the ways that you can change the permissions and prevent the error message from showing again.

Show More

* This button will show the rest of the post and open up an offer from a vendor

What are the Default File Types can you Install on WordPress Website?

By default, you can install numerous file types to your website such as (.jpg, .jpeg, .png, .gif, .ico, .pdf, .doc, .odt and more). If you’re not uploading a file type that is within the default list, you can see the message.

Fixing the ‘Sorry, This File Type Is Not Permitted For Security Reasons’ Error

There are two ways that you can fix the error: manually editing your wp-config.php file and by adding a free WordPress plugin to your website. Here are the two ways.

Add the new Permitted File Types Using the wp-config.php File

Within the wp-config.php file there is an ALLOW_UNFILTERED_UPLOADS option. Once enabled, you can upload any file type.

The first thing you need to do is to backup your WordPress website. This prevents mistakes from causing long term damage. To get started, connect to the WordPress website’s files through the FTP/SFTP. Under the root folder, you should find the wp-config.php.

Download the file to your local drive and then open it up with a text editor. Then add the following code snippet to the file above the ‘That’s all, stop editing! Happy blogging.’ line.

define('ALLOW_UNFILTERED_UPLOADS', true);

Save the changes to the wp-config.php file and then reupload the file to your online files.

Once you’ve done this, you can log out of your WordPress website and then log back in again. This should solve the problem.

Use a Free Plugin

The other option, for those who aren’t confident about editing the wp-config.php file, then you can use a free plugin. The plugin is WP Extra File Type plugin. Once, installed you can activate the update then go to ‘Settings’ and then ‘Extra File Types’ within the WordPress dashboard.

Within this screen, you can see a list of file types. You can just check the box next to the file types you want to add to the acceptable upload types. When you’ve selected the files you want to add, click on ‘Save Changes’.

Final Word: How to Fix ‘Sorry, This File Type Is Not Permitted For Security Reasons’ Error in WordPress

Trying to upload a new file type to your WordPress website that isn’t being accepted. Then try one of the two options above to solve the problem. The free plugin will work fine, but it might slow down your website slightly. Whereas the wp-config.php file method is more speed friendly.

Recap:
Save 4 Later
Email liked links to yourself