If while trying to upload something to your WordPress website, If you cannot upload the ttf file you can enable it by following any of these method:
Fix Method 1: Editing wp-config.php File
Editing your site’s wp-config.php file can allow you to upload all file types to the media library, including unsupported ones. However, keep in mind that this method will make your WordPress website less secure.
We advise you to revert any changes made once you have uploaded the unsupported file.
Also, because you’ll be editing a system file, make sure to create a backup of your site before proceeding in case something goes wrong.
- Access your WordPress installation directory via an FTP client or File Manager. If you use Hostinger, open hPanel and navigate to Files -> File Manager.
- Open the public_html folder and open the wp-config.php file.
Paste the following code snippet above the line that says That’s all, stop editing! Happy publishing. Then, Save your changes.
You can enable ttf file uploading by adding this line to your wp-config.php file:
After uploading the ttf files, please remove the line.