• how to host google font locally for my wordpress online website
    Le Papillon

    how to host google font locally for my wordpress online website

    Hosting Google Fonts locally on your WordPress site is an excellent way to boost your site’s performance, improve privacy compliance (like GDPR), and give you more control over your assets. Here are the most effective ways to do it, ranging from easiest to most hands-on.

    ⚡ Method 1: Use a Dedicated Plugin (Easiest & Most Common)

    This is the best method for most users, as it’s automated and requires no coding. Several excellent free plugins in the WordPress directory can scan your site, download the fonts, and rewrite the URLs for you.

    Here are a few top recommendations based on the search results:

    Plugin NameKey FeaturesBest ForHands-on Setup Required
    LocalFontsZero configuration, catches hardcoded links and @import rules, auto-downloads fonts via WP-Cron, removes connection hints to Google.Users who want a “set it and forget it” solution that works automatically after activation.No
    EasyFontsLightweight (30kb), handles Google Fonts and Bunny Fonts, supports @font-face in inline styles, compatible with page builders.Users who need a lightweight solution that also supports the privacy-friendly Bunny Fonts.Minimal (configure in settings)
    Local Google FontsSettings page to choose which fonts to load, option for automatic loading, helps with GDPR compliance.Users who want more control over which specific fonts are loaded locally.Moderate (choose fonts in settings)
    Fonts ManagerAutomatically scans pages, retrieves Google Fonts URLs, downloads and replaces links.Users who want a simple, automatic scanning and hosting process.Minimal

    General Installation Steps:

    1. In your WordPress admin panel, go to Plugins > Add New.
    2. Search for the plugin name (e.g., “LocalFonts” or “EasyFonts”).
    3. Click Install Now and then Activate.
    4. Depending on the plugin, you may need to visit its settings page (usually under Settings) to configure options or click a “Reload Fonts” button . For most, activation is all you need.

    To verify it’s working, use your browser’s developer tools (F12), go to the Network tab, filter by “Fonts”, and reload your page. You should no longer see requests to fonts.googleapis.com or fonts.gstatic.com .

    🚀 Method 2: Use a Performance Plugin (Best if You Already Use One)

    If you already use a comprehensive caching and performance plugin, it likely has this feature built-in, saving you from installing an extra plugin.

    • WP Rocket: This premium plugin has a “Self-host Google Fonts locally” option. You can find it by going to Settings > WP Rocket > Media tab and checking the box . The plugin will then detect, download, and rewrite the font URLs for you. It also provides filters to exclude specific fonts if needed .
    • Autoptimize & Perfmatters: These popular optimization plugins also offer options to disable or remove Google Fonts, which forces your site to use system fonts . While this doesn’t “host” the Google Fonts locally, it’s a valid alternative if you want to eliminate external requests for privacy or performance reasons.

    🛠️ Method 3: Do It Manually (For Full Control)

    For developers or those who prefer a code-based approach, manual self-hosting is a viable option. It’s more work but gives you complete control over the files .

    The Process:

    1. Download Fonts: Go to Google Fonts, select the fonts you need, and click “Download all” to get the .ttf (TrueType) files.
    2. Convert Formats: Web fonts should be in .woff2 format for best performance and browser support. Use a free online converter (like CloudConvert) to convert the .ttf files to .woff2.
    3. Upload to Server: Using an FTP client (like FileZilla) or your hosting control panel’s file manager, upload the .woff2 files to a new folder inside your (child) theme’s directory, for example, /wp-content/themes/your-child-theme/fonts/.
    4. Declare with @font-face: Add the CSS code to declare your new font family. This should be added to your child theme’s style.css file or via the WordPress Customizer’s “Additional CSS” section.
      css @font-face { font-family: 'My Local Font'; src: url('/wp-content/themes/your-child-theme/fonts/my-font.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
    5. Apply the Font: Use the font-family rule to apply your locally hosted font to specific elements like headings or body text.
      css body { font-family: 'My Local Font', Arial, sans-serif; }

    🤔 Which Method is Right for You?

    • For most users: Method 1 (Dedicated Plugin) is the best choice. It’s simple, automated, and highly effective. LocalFonts is a great starting point due to its zero-configuration approach .
    • For performance enthusiasts: If you already own WP Rocket, use its built-in feature to keep your toolkit lean .
    • For developers: Method 3 (Manual) provides the most control and eliminates the need for any additional plugins, but it requires more technical effort.

    Hope this helps you get your fonts hosted locally. What WordPress theme or page builder are you currently using? Knowing that might help narrow down the plugin choice, as some work better with specific builders like Divi or Elementor .


    Comment

    We are glad you have chosen to leave a comment. Please keep in mind that comments are moderated according to our comment policy .
    Posting comment on "how to host google font locally for my wordpress online website"
    1 2 3 4 5
    Thank you for your comment.

    There is no comment for this post currently,
    be the first one to write a comment.

    Le Papillon

    Author Rank: 10
    Author's Name: kk Zhang
    User ID: 10000325
    Number of posts published by user: 4


    Related     Posts
    No image
    04/22/2026  |  
    use oracle cloud free instance to set up a wordpress website step by step instruction

    Setting up a WordPress website on Oracle Cloud’s free tier is a great way to build a site with no upfront costs. The process involves setting up your
    » » » »

    No image
    04/22/2026  |  
    how to set up wordpress website on local computer

    Of course! Setting up a WordPress website on your local computer is an excellent way to learn, test themes/plugins, or build a site before it goes live. This
    » » » »

    No image
    04/21/2026  |  
    after setting up my wordpress website on local computer, how to make it accessible to the public user and public user is able to preview the wordpress website locally built on my personal computer? pros and cons?

    Making your locally-built WordPress site accessible to the public is a common next step for sharing your work or getting client feedback. There are two main paths you
    » » » »

    03/21/2022  |  
    在甲骨文 Oracle Cloud 上搭建永久免费 WordPress 网站

    Key tasks include how to: Free Tier: Install WordPress on an Ubuntu Instance https://docs.oracle.com/en-us/iaas/developer-tutorials/tutorials/wp-on-ubuntu/01-summary.htm

    No image
    01/21/2021  |  
    模板问题

    参考 外观–》 自定义–》主页设置–》主页名 主页名 -> Setting -> CONTENT LAYOUT -> 100% Full Width The Menus Screen enables the user to create a custom menu (also known as a
    » » » »

    No image
    12/10/2020  |  
    有关主机地区的问题

    在使用云服务器的时候 一开始会有主机地区选择 有些同学可能会选择主机地区在国内 觉得自己的网站对象是国内用户 或者有些同学不是使用云服务器 是选择使用我们大家经常用的主机托管公司 主机提供商很多了 像Blue Host, Hostgator, GoDaddy等等 界面友好 不像谷歌云和阿里云这样子我们需要自己打入LINUX的指令 在选择主机地区的时候 如果你是打算搭建WordPress网站 最好主机地区不要选择在国内大陆 虽然WordPress是开源的 在国内使用访问登录没有问题 但是因为你所选择的WordPress主题或者插件可能会用到Google的产品 像Google Font, Google Map等等 或者会用到其他被禁的产品 我不知道JQuery是不是也在国内禁用 JQuery是大多数WordPress主题都会用到的JavaScript代码库 如果你的主机放在国内 你所选择的WordPress主题需要的这些的文件和程序可能拿取不到
    » » » »

    No image
    12/08/2020  |  
    使用all in one wp migration不可以导出网站

    Introduced in 2013 and used by over 60 million websites, All-in-One WP Migration is verifiably one of WordPress’ most trusted and utilized plugins for moving websites with absolute
    » » » »

    No image
    12/07/2020  |  
    想用all in one wp migration迁移WordPPress网站 文件大于512M

    When building websites, we tend to create a site locally or on a development server and then migrate the site on the client’s server when done. The All
    » » » »

    No image
    12/07/2020  |  
    谷歌云搭建的WordPress登录密码忘记了 收不到邮件恢复密码

    Why Add an Admin User to the WordPress Database via MySQL?We once ran into an issue where a user’s site was hacked, and their admin account was deleted
    » » » »

    No image
    12/07/2020  |  
    Elementor在使用过程中有问题

    Create a WebsiteDesign Your FuturePower your vision with Elementor to build, manage and host stunning websites!We’ve got you covered from A-to-Z with the #1 website platform for WordPress.
    » » » »

    No image
    12/07/2020  |  
    Screen Options不可以下拉

    Screen Options is a fly down menu button located on the top right corner of some pages in your WordPress admin area. When clicked, Screen Options menu shows
    » » » »

    No image
    12/07/2020  |  
    阿里云分国际和国内版?

    Alibaba Cloud is more of an International Entity subsidiary of Alibaba Group which is still in the progress of porting of all the services from Aliyun with enhancements.
    » » » »

    No image
    12/07/2020  |  
    SSL 安全证书

    DescriptionReally Simple SSL will automatically configure your website to use SSL to its fullest potential. Use extra security features to protect your website, and use our server health
    » » » »

    12/06/2020  |  
    谷歌云 – 用完300元试用赠金或者没有用完?

    Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that provides a series of modular cloud services including computing, data storage, data analytics,
    » » » »