Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Workaround for the font library staging–live issue

  • Hi There,

    I’ve been through the forum and have seen a few posts that detail the same issue, that fonts uploaded to the font library break when pushed between live and staging. I’ve been using disabling/re enabling the font to get the fonts back, but the site in question would be pushed live a few times a day by the client. Is there any alternative until a fix is in place? Can I exclude anything from the deployment? Add the font in a different way?

    Thanks

    Dave

  • Hi Dave,

    When you mentioned that it would be pushed live a few times a day, do you mean a full site push or just incremental changes?

    If it’s only incremental, the font library shouldn’t have any issues. Once you disable and re-enable the font after the first migration from staging to live, the font stylesheet will have already regenerated and be referencing the live URL.

    This is something we’re actively looking to improve.

  • Hi Alvind,

    Unfortunately, this isn’t the case for this setup. The site is being fully deployed from staging to live & the fonts having to be re-enabled each time. Is there a workaround/alternative I can use?

    Thanks

    Dave

  • The site is being fully deployed from staging to live & the fonts having to be re-enabled each time.

    A workaround would be to access the fonts.css file at wp-content/uploads/generatepress/fonts/fonts.css, and change the absolute URL to relative URL.

    For example, if the font file URL in the fonts.css is https://your-domain.com/wp-content/uploads/generatepress/fonts/inter/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiA.woff2

    Change it to /wp-content/uploads/generatepress/fonts/inter/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiA.woff2

    As long as you don’t touch the font library, the font file URL should be using relative URL, and it should not be affected by the migration.

  • Thanks Ying,

    I’ll give that a go. Would this be overwritten by theme updates?

    Thanks

    Dave

  • I don’t think so, but let me know if it does 🙂

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