Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  WordPress FAQ  >  How to Fix Error in WordPress, “Sorry You are Not Allowed to Upload this File Type”
Top Scroll

How to Fix Error in WordPress, “Sorry You are Not Allowed to Upload this File Type”

 2 min

When you’re trying to upload file to your WordPress Media library, there are chances you might get the error, “Sorry, you are not allowed to upload this file type.” You usually get this message, when you upload the file with a different extension than what is allowed in WordPress.

In WordPress, the file types allowed are:

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

If you enter extensions besides this, then you will get an error message saying, “ “Sorry, you are not allowed to upload this file type.”

For allowing the upload, go to Site Tools > Site > File Manager and thenedit the wp-config.php file for your WordPress site.This is found in the public html folder.

Now, above the line, “That’s all, stop editing! Happy publishing,’ insert the command given below:

define('ALLOW_UNFILTERED_UPLOADS', true);

Save all the changes to your file and you need to be able to upload the desired file from your WordPress wp-admin > Media> Add New.

Conclusion

Now, for security purpose, it is suggested to remove that new line you added in the wp-config,php after uploading the given files. If later you need to upload more, you can add the line again.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.