Get Your Free Cheat Sheet for CMS and Application Errors
Easily tackle CMS and Application errors with our handy quick-fix guide.
Google reCAPTCHA used. Privacy Policy and Terms of Service apply
Get Your Free Cheat Sheet for CMS and Application Errors
Easily tackle CMS and Application errors with our handy quick-fix guide.
Google reCAPTCHA used. Privacy Policy and Terms of Service apply
When uploading a file to your WordPress Media Library, you might encounter the “Sorry, you are not allowed to upload this file type.” error. The message appears when you try to upload a file with an extension different than what WordPress allows by default. The default file types allowed are:
Trying to upload files with extensions outside of the above will result in the “Sorry, you are not allowed to upload this file type.” error.
To change the file extension to avoid the “Sorry, You Are Not Allowed to Upload This File Type” error in WordPress, follow the steps below.
On MacOS – locate the file, right-click, and select “Get Info.” Under “Name & Extension,” edit the file name, including the desired extension. Confirm the change and acknowledge any warning prompts.
On Windows – find the file, right-click, and choose “Rename.” Modify the file name, ensuring the new extension is appropriate. Windows may ask for confirmation; proceed accordingly. After changing the file extension, consider updating any references within the article or associated metadata. Test the upload functionality on WordPress to ensure the error is resolved.
To allow the upload, go to Site Tools > Site > File Manager and edit the wp-config.php file for your WordPress, which is usually found in the public_html folder. Above the line ‘That’s all, stop editing! Happy publishing.‘ insert the following:
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.
For security reasons it is recommended to remove that new line you added in the wp-config.php after you upload the desired files. If you later want to upload more, you can add the line again.
Fix common CMS and Application errors with ease. Download our free ebook – it is all that you need to solve similar errors!