Knowledge Base
MilesWeb / WordPress FAQ

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

Approx. read time : 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:

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.


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.

Nehal Khatri
Nehal is an ardent content writer. She's passionate about crafting content that's simple but adds value. Her insatiable interest in writing has allowed her to explore her skills. She is adept and can write for different types of content formats.