Stepholt News

How to Fix “Sorry, This File Type Is Not Permitted for Security Reasons” – WordPress

News Categories: Wordpress

This article was published on: 08/17/20 6:30 PM

Looking to use custom Web fonts on your WordPress Themes? Some hosting providers restrict the upload of WOFF files to enable custom fonts. Here is a quick break down of how to enable this feature.

WordPress includes an ALLOW_UNFILTERED_UPLOADS option that you can enable in your site’s wp-config.php file but its not set by default, we will show you how so once this is enabled, you’ll be able to upload any file type to your WordPress Media Library including custom font files.

 

Here’s how to set it up – but first, because you’ll be editing your wp-config.php file, we’d recommend backing up your site before proceeding.

 

Connect to your WordPress site via FTP/SFTP.

Locate your site’s wp-config.php ( file is located in the root folder, which is the same folder that has the wp-admin and wp-includes folders)

Open wp-config.php

Add the following line

define('ALLOW_UNFILTERED_UPLOADS', true);

Save and overwrite

Upload your custom WOFF, WOFF2 fonts, and enjoy.

Simples.

Website Design
Website Development
Website Marketing