Can’t Upload Woff or Woff2 files
-
Hi there, I’m trying to upload a custom font. I have my Woff/Woff2 files, but no matter what I try wordpress refuses to allow me to upload these font types.
Attachments:
You must be
logged in to view attached files.
Hello,
Kindly read and follow the below documentation to upload your custom fonts.
https://xtemos.com/docs/woodmart/faq-guides/upload-custom-fonts/
In case after following the above documentation the error still shows as “This file type cannot be uploaded due to security reasons.” Then follow the below steps:
1. Add this line to the wp-config.php file: define( ‘ALLOW_UNFILTERED_UPLOADS’, true );
2. Upload all files formats
3. Remove this line from wp-config.php file
Best Regards.