How to fix “Sorry, you are not allowed to upload this file type.” error in WordPres?

How to fix “Sorry, you are not allowed to upload this file type.” error in WordPres?

The “Sorry, you are not permitted to upload this file type.” issue may appear when you attempt to upload a file to your WordPress Media Library. 

The warning shows when you attempt to upload a file with an extension that WordPress does not by default support.

  1. Kindly login to your cpanel account.
  2. In the file section, click on file manager.
  3. Open the wp-config.php file and add below code.

define(‘ALLOW_UNFILTERED_UPLOADS’, true);
Save the changes to the file and you should be able to upload the desired file from your WordPress wp-admin -> Media -> Add New.