This error occurs when you try to upload a file with an unsupported extension in WordPress.

Supported File Types in WordPress

  • Images: .jpeg, .jpg, .png, .gif, .ico

  • Documents: .pdf, .psd, .xlsx, .odt, .ppsx, .pps, .pptx, .docx, .doc

  • Audio: .mp3, .wav, .ogg

  • Video: .mp4, .wmv, .ogv, .3g2, .avi, .m4v, .3gp

Uploading files outside these types will trigger the error:

“Sorry, you are not allowed to upload this file type.”

How to Fix

  1. Access File Manager

    • Go to Site Tools → Site → File Manager.

    • Open the wp-config.php file in your WordPress site folder (public_html).

  2. Enable Unfiltered Uploads

    • Add this line above:

     
    define('ALLOW_UNFILTERED_UPLOADS', true);
    • Save the changes.

  3. Upload Your File

    • Go to WordPress Dashboard → Media → Add New and upload the desired file.

  4. Security Recommendation

    • After uploading, remove the line from wp-config.php.

    • Add it back only if you need to upload unsupported file types in the future.

Tip: Only enable unfiltered uploads temporarily to avoid security risks.

Was this answer helpful? 0 Users Found This Useful (0 Votes)