[Resolved] Local Font Upload ttf file denied

Home Forums Support [Resolved] Local Font Upload ttf file denied

Home Forums Support Local Font Upload ttf file denied

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #1172757
    Melanie 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.

    #1172801
    Leo
    Staff
    Customer Support

    Hi there,

    Are you using any security plugins?

    If not then I’d recommend checking with your hosting support.

    #1172870
    Melanie Swan

    Thanks

    #1172905
    Leo
    Staff
    Customer Support

    No problem 🙂

    #2087575
    Rostyslav

    I 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.

    #2087585
    Rostyslav

    I 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.

    #2087596
    David
    Staff
    Customer Support

    Hi 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.

    #2537862
    Oliver

    I´m having the same problem. Is there a way to add that code define('ALLOW_UNFILTERED_UPLOADS', true); with a snippet?

    #2537919
    David
    Staff
    Customer Support

    Hi there,

    that code needs to go in the wp-config theres no snippet alternative for that.
    Is it only the ttf file you’re having an issue with ?

    #2543533
    Oliver

    Hi 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.

    #2543539
    Fernando
    Customer Support

    Hi 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?

    #2544357
    Oliver

    Hi 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 code define('ALLOW_UNFILTERED_UPLOADS', true);, with notepad, upload the edited file after removing the original, upload the fonts, and edit the config.php to remove define('ALLOW_UNFILTERED_UPLOADS', true); and replace the newly edited file after deleting the file with the code.

    #2544369
    Rostyslav
    #2544733
    Fernando
    Customer Support

    Yes, 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.

    #2545162
    Oliver

    Thanks a lot both of you guys, have a nice day.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.