When you try to upload a file to the WordPress media library, you may encounter the error "Sorry, you are not allowed to upload this file type". This message appears when you try to upload a file with an extension other than those allowed by WordPress by default. The file types allowed by default are:
- Images: .jpeg, .jpg, .png, .gif, .ico
- Documents: .pdf, .doc, .docx, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx, .psd
- Audio: .mp3, .m4a, .ogg, .wav
- Video: .mp4, .m4v, .mov, .wmv, .avi, .mpg, .ogv, .3gp, .3g2
If you try to upload files with extensions other than those listed above, you will receive the error "Sorry, you are not allowed to upload this file type".
To allow the upload, edit the file wp-config.php in your WordPress installation, which is normally located in the public_html folder. Before 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 admin panel under Media > Añadir nuevo.
For security reasons, we recommend removing the new line you added to wp-config.php after uploading the desired files. If you want to upload more files later, you can add the line again.
We hope this article has helped you. If you have any remaining questions about this or any other issue related to your servers on Clouding, email us at soporte@clouding.io. We're here to help! 😉