How to add custom fonts to WordPress: 3 methods

Nov 20, 2026 6 min Read
How to add custom fonts to WordPress: 3 methods

You can add custom fonts to WordPress with the built-in Font Library, a font plugin, or a few lines of @font-face CSS. On WordPress 7.0 and later, the Font Library under Appearance → Fonts works with both block and classic themes and needs no code.

Each method comes with step-by-step instructions and a quick guide to choosing between them. You’ll also learn where to find fonts licensed for web use and how to convert them to WOFF2, the format all modern browsers support.

How to add custom fonts to WordPress

The best way to add custom fonts to WordPress depends on your WordPress version, your theme, and how much control you need. To upload your own font with any method, you need a font file in WOFF2, WOFF, TTF, or OTF format whose license allows web use.

MethodBest forCode neededTheme support
WordPress Font LibraryMost sites on WordPress 6.5 or laterNoBlock themes from 6.5; block and classic themes from 7.0
Font pluginPage builders or themes that read fonts from the plugin; older WordPress versionsNoDepends on the plugin
Manual @font-face CSSPrecise control over which elements use the fontYes (CSS)Any theme

Start with the Font Library if your site runs WordPress 6.5 or later. Choose a plugin when your page builder or theme relies on one, and use manual CSS when you want to target specific elements without adding another plugin.

Prefer video? This tutorial walks through the Site Editor’s built-in font manager, a font plugin, and a manual setup using a child theme.

How to add custom fonts with the WordPress Font Library

The WordPress Font Library lets you upload font files or install Google Fonts without a plugin or code. Starting in WordPress 7.0, it’s available for both block and classic themes under Appearance → Fonts. On WordPress 6.5 to 6.9, the Font Library works with block themes only and sits in the Site Editor under Styles → Typography.

To upload your own font on WordPress 7.0 or later:

  1. Go to Appearance → Fonts in your WordPress dashboard.
  2. Open the Upload tab.
  3. Upload your font file in .woff2, .woff, .ttf, or .otf format.
  4. Open the Library tab and confirm that the new font appears in the list.

To install a Google Font instead, open the Install Fonts tab, click Allow access to Google Fonts, search for the font, select the variants you need, and click Install. WordPress downloads the font files and hosts them on your site rather than loading them from Google’s servers.

To apply the font in a block theme, go to Appearance → Editor → Styles and choose it for your site’s text or for specific blocks, such as Heading or Paragraph. The available options depend on your theme. In a classic theme, apply the font through the theme’s typography settings or with a CSS font-family rule, as shown in the manual @font-face method.

Once the new font is live, you can fine-tune heading and body text sizes with our guide on how to change font size in WordPress.

How to add custom fonts with a WordPress plugin

A font plugin is the easiest choice when your page builder or theme reads fonts from the plugin, or when your site runs a WordPress version older than 6.5. Both plugins below are available in the WordPress plugin directory, and you can install WordPress plugins from your dashboard in a few clicks.

Custom Fonts

The free Custom Fonts plugin lets you upload your own font files or pick Google Fonts and host them on your own server. Hosting fonts locally reduces external requests to font services, which can help pages load faster.

Once installed, you can reach the plugin under Appearance in your WordPress dashboard. Upload the fonts from your computer using the Local Fonts option or choose from hundreds of Google Fonts. Once you’re all set, click on Save Font and that’s it. The fonts will now be available for you to apply them to various elements of your website.

Use Any Font

The Use Any Font plugin uploads TTF, OTF, WOFF, or WOFF2 files and converts them to WOFF2 through the developer’s conversion server. The conversion requires an API key: a free Lite/Test key converts a single font, while more fonts or variants need a premium key.

After uploading a font, assign it to HTML elements or custom CSS selectors from the plugin’s font assignment screen.

Using the Use Any Font plugin

How to add custom fonts manually with @font-face

Adding a font manually means uploading the font file to your server and loading it with a CSS @font-face rule. This method works with any theme and needs no plugin, but you should be comfortable editing CSS.

Store the font outside your theme folder. Theme updates replace the theme’s files, so a font saved in wp-content/themes/your-theme/fonts can disappear after an update.

  1. Convert your font to WOFF2 with the steps in “How to convert fonts to a web-friendly format”, then extract the .zip archive.
  2. Open your site files with an FTP client like FileZilla or your hosting file manager. On Hostinger managed WordPress hosting, go to Websites → Manage site → Files → File Manager.
  3. Create a folder named custom-fonts inside wp-content/uploads.
  4. Upload your .woff2 file to the wp-content/uploads/custom-fonts folder.

Next, register the font with an @font-face rule in your site’s custom CSS, for example in the Additional CSS panel. Our guide on how to add custom CSS to WordPress explains where to find it in block and classic themes. Replace the font-family name and file path with your own:

@font-face {
  font-family: "Aguafina Script";
  src: url("/wp-content/uploads/custom-fonts/AguafinaScript-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

The file path above assumes WordPress is installed at your domain’s root. If your site runs in a subfolder, add that folder to the path.

The @font-face rule only registers the font, so nothing changes until you assign it to an element. This example applies Aguafina Script to the site title, with Arial and a generic sans-serif font as fallbacks:

.site-title,
.wp-block-site-title {
  font-family: "Aguafina Script", Arial, sans-serif;
}

Classic themes often use the .site-title class, while block themes use .wp-block-site-title for the Site Title block. If neither selector works, inspect your theme’s markup with your browser’s developer tools. Save the CSS, then reload your site in a private browser window to confirm that the new font appears.

Where can you find fonts for WordPress?

Free font libraries are the easiest place to find fonts for WordPress, while premium marketplaces offer more distinctive typefaces. Whatever the source, check that the font’s license allows web use before you upload it to your site.

  • Google Fonts – a free, open-source collection that you can also install directly from the WordPress Font Library.
  • Font Squirrel – free fonts licensed for commercial work, plus the Webfont Generator converter.
  • Envato Elements – thousands of premium fonts.
  • Fonts.com – a large catalog of commercial fonts.
  • DaFont – a large free collection where licenses vary from font to font.
  • 1001 Free Fonts – another large free collection with font-specific licenses.

If you’d rather skip extra font files entirely, web-safe HTML fonts such as Arial and Georgia are already installed on most devices.

How to convert fonts to a web-friendly format

Convert desktop font files such as TTF or OTF to WOFF2 before you add them to WordPress. All modern browsers support WOFF2, and it compresses better than older formats, so pages load font files faster.

Common font formats include:

  • Web Open Font Format 2 (WOFF2) – the recommended web format, supported by all modern browsers.
  • Web Open Font Format (WOFF) – the earlier web format, worth adding as a fallback only if you need to support older browsers.
  • TrueType Font (TTF) and OpenType Font (OTF) – desktop formats that browsers can load, but with larger files than WOFF2.
  • Embedded OpenType (EOT) – a legacy format that modern browsers don’t need.

Font Squirrel’s free Webfont Generator converts most font files to WOFF2 and WOFF:

  1. Go to Webfont Generator.
  2. Click the Upload Fonts button and choose a font that you want to convert.
  3. Tick the box in the Agreement section to state that your fonts are legally eligible for web embedding.
  4. Press the Download Your Kit button and save the .zip archive to your computer.
    Converting fonts to a web friendly format using Webfont Generator
  5. Inside the archive, you will find fonts in WOFF and WOFF 2.0 format along with CSS files and demo HTML page.

Next steps after adding a custom font

Check your new font on desktop and mobile, and limit your site to two or three font families so pages stay readable and consistent. Run a page speed test after the change, since every extra font weight adds a file for visitors to download. Keep a copy of each font’s license, and delete fonts you no longer use from the Font Library or your font plugin.

If you have any questions regarding how to add fonts to WordPress, share your thoughts in the comment section below, and visit our WordPress guide for any general questions about the CMS.

WordPress custom font FAQ

How do I add a custom font to WordPress without plugins?

To manually add custom fonts to WordPress, you will need to use an FTP client like FileZilla or a File Manager. You will need to upload the custom font to your hosting account and edit your theme’s CSS file.

Can I use any font on WordPress?

Yes, you can use any font on WordPress. However, it is important to keep in mind that some fonts may be too large or too small for your website, so it is important to make sure that the font you choose is compatible with your theme.

Is it illegal to use the same font as another company?

The legality of using a particular font depends on the context and its usage. Fonts are considered intellectual property and may be protected by copyright laws in most countries. Ultimately, whether it’s illegal to use someone else’s font varies according to each country’s laws so you should consult a lawyer.

This article is a localized version of How to add custom fonts to WordPress: 3 methods, originally published in English.

All of the tutorial content on this website is subject to Hostinger's rigorous editorial standards and values.

Domantas leads the content and SEO teams forward with fresh ideas and out of the box approaches. Armed with extensive SEO and marketing knowledge, he aims to spread the word of Hostinger to every corner of the world. During his free time, Domantas likes to hone his web development skills and travel to exotic places.

Trusted by 4+ million website owners worldwide

See our 74,487 reviews on Trustpilot