- This topic has 15 replies, 4 voices, and was last updated 1 year, 1 month ago by Fernando.
-
AuthorPosts
-
February 21, 2020 at 8:11 am #1172757Melanie Swan
Hello,
I was following the tutorial how to host fonts on GP locally. Unfortunately the ttf file was not allowed due to security reasons. All other files I could upload. Is there something new in WP?
I am on PHP 7.4. Newest GP, Newest WP
Thanks.
February 21, 2020 at 8:57 am #1172801LeoStaffCustomer SupportHi there,
Are you using any security plugins?
If not then I’d recommend checking with your hosting support.
February 21, 2020 at 9:40 am #1172870Melanie SwanThanks
February 21, 2020 at 10:06 am #1172905LeoStaffCustomer SupportNo problem 🙂
January 20, 2022 at 9:09 am #2087575RostyslavI have the same problem. Called to my hosting and they are not blocking that file. I installed wordpress in local and its also not working. ttf file denied.
January 20, 2022 at 9:18 am #2087585RostyslavI had to temporarily add the following code to wp-config.php:
define('ALLOW_UNFILTERED_UPLOADS', true);
And then of course deleted it as soon as I had uploaded the font.
January 20, 2022 at 9:30 am #2087596DavidStaffCustomer SupportHi there,
glad to hear you found a solution to the issue.
As a general note – if you have .woff and .woff2 variants of the font then .ttf isn’t really required.February 18, 2023 at 6:24 am #2537862OliverI´m having the same problem. Is there a way to add that code
define('ALLOW_UNFILTERED_UPLOADS', true);
with a snippet?February 18, 2023 at 7:13 am #2537919DavidStaffCustomer SupportHi there,
that code needs to go in the
wp-config
theres no snippet alternative for that.
Is it only thettf
file you’re having an issue with ?February 22, 2023 at 11:29 pm #2543533OliverHi David,
I´m sorry for the late reply, I was not home. It won´t allow me to upload the tff, woff and woff2 files, either using the media uploader nor through ftp connection. I can only upload the html and eot files from the unzipped folder. My hosting provider shouldn´t be the issue as they themselves have a couple of blog posts where they recommend their clients to self-host google fonts.February 22, 2023 at 11:35 pm #2543539Fernando Customer SupportHi Oliver,
Are you not able to access the
wp-config
through FTP? If not, can you reach out to your Hosting Provider for assistance with regards to accessing that file?February 23, 2023 at 10:10 am #2544357OliverHi Fernando, I didn´t know I should look for a config.php file and edit it, I thought that was something that could be done in the theme file editor.
Just to be sure, I connect via ftp, search for config.php, download a copy and add the codedefine('ALLOW_UNFILTERED_UPLOADS', true);
, with notepad, upload the edited file after removing the original, upload the fonts, and edit the config.php to removedefine('ALLOW_UNFILTERED_UPLOADS', true);
and replace the newly edited file after deleting the file with the code.February 23, 2023 at 10:26 am #2544369RostyslavFebruary 23, 2023 at 5:28 pm #2544733Fernando Customer SupportYes, that’s correct. You may learn more about the process here: https://kinsta.com/knowledgebase/sorry-this-file-type-is-not-permitted-for-security-reasons/#how
You may also try Rotyslav’s suggestion if you don’t want to do it that way.
February 24, 2023 at 2:36 am #2545162OliverThanks a lot both of you guys, have a nice day.
-
AuthorPosts
- You must be logged in to reply to this topic.