← Back to blog

How to change the font in WordPress, and where the font you pick is stored

The SandyWP team 8 min read

To change the font in WordPress, install it first in Appearance, Fonts (from Google Fonts or by uploading a file), then apply it in Appearance, Editor, Styles, Typography. Installing a font only makes it available; nothing on the site changes until you pick it for text, headings or another element.

In a classic theme without the Site Editor, the theme's own typography settings in Appearance, Customize or a line of CSS do the applying instead.

Every guide that ranks for this covers those clicks. None of the four we read (WPBeginner, Kinsta, Themeisle and QuadLayers) says where the font goes once you click Install.

That answer explains the three complaints that come up most: the font vanished after a theme switch, the cloned site shows the wrong font, and deleting a font changed the live site. Everything below is checked against the WordPress 7.1.4 source.

Where do I change fonts in WordPress?

There are two separate jobs, and WordPress puts them in two places.

Installing a font happens in the Font Library. Since WordPress 7.0 it has its own screen at Appearance, Fonts (wp-admin/font-library.php), and it is added to the menu for every theme, block or classic.

You can also reach it from the Site Editor: Styles, Typography, then Manage fonts (or Add fonts when nothing is installed yet).

Applying a font happens in global styles. In a block theme that is Appearance, Editor, Styles, Typography, where you set the font per element: Text, Links, Headings, Captions and Buttons.

How do I change the font in a block theme?

  1. Go to Appearance, Editor and open Styles.
  2. Click Typography, then Manage fonts to open the Font Library.
  3. Install the font (see the next two sections), then close the library.
  4. Back in Typography, click Text and pick the new font family. Repeat for Headings if you want them different.
  5. Click Save.

To change the font of a single block instead, select it and use the Typography panel in its sidebar. That setting lives in the post content, not in global styles.

The same Typography screen sets font sizes. If you only wanted bigger text, that is where the size presets and the Fluid typography toggle are, and you do not need a new font at all.

How do I add Google Fonts to WordPress without a plugin?

Open the Font Library and go to the Install Fonts tab. WordPress asks for permission first, and the prompt is explicit:

"To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site."

Click Allow access to Google Fonts, search for the family, tick the variants you need, and click Install.

The collection's own description says "Fonts are copied to and served from your site." So visitors' browsers never request anything from Google. If the privacy worry behind your search is visitor IP addresses going to Google, the core Font Library already avoids it.

Install only the weights you use. Each variant is a separate file the browser may download.

How do I upload a custom font file?

In the Font Library, the Upload tab takes font files directly. Core accepts four formats, listed in WP_Font_Utils::get_allowed_font_mime_types(): otf, ttf, woff and woff2.

Use woff2 if you have it. It is the smallest, and every current browser supports it.

Upload only fonts your licence lets you self-host. A desktop licence for a commercial typeface usually does not cover serving it from a web server.

Where does WordPress store installed fonts?

In three places, and they do different jobs.

The files go to wp-content/uploads/fonts/. wp_font_dir() builds that path by appending /fonts to the uploads base directory, and the font_dir filter can move it.

The library records are posts. Each family is a wp_font_family post and each variant is a wp_font_face post under it, with the file path in the _wp_font_face_file post meta.

These records are not tied to a theme.

The active list is the part that changes your site. When you install a font, the editor also adds it to settings.typography.fontFamilies.custom in global styles, and saves that.

Global styles is a wp_global_styles post, one per theme. It is tagged with the active theme's folder name in the wp_theme taxonomy, and its slug is wp-global-styles-<theme>.

On the front end, wp_print_font_faces() runs on wp_head and prints @font-face rules only for fonts in the merged global settings. A font that sits in the library but is not in that list is never loaded.

You can see all of it over SSH with WP-CLI:

wp post list --post_type=wp_font_family --fields=ID,post_title
wp post list --post_type=wp_global_styles --fields=ID,post_name
wp post get 123 --field=post_content
ls wp-content/uploads/fonts/

The third command prints the global styles JSON for one theme. Search it for fontFamilies to see exactly which fonts that theme loads.

Why did my font disappear after switching themes?

Because the active list belongs to the old theme. The library is shared, but the new theme reads its own wp_global_styles post, which has never heard of your font.

So after a switch, the font still shows in Appearance, Fonts, but the site is back on the new theme's defaults. Re-select it in the new theme's Styles, Typography and save.

Switch back, and the old theme's choices are still there. Nothing was deleted; each theme simply keeps its own settings.

The same split catches child themes. A child theme has its own folder name, so activating it starts a fresh global styles post, and the parent's font choices do not carry over.

Why did a theme update not change my fonts?

Because your choices override the theme. Core merges theme.json data from WordPress, then blocks, then the theme, then the user's global styles post, in that order, in WP_Theme_JSON_Resolver::get_merged_data().

Anything you saved in Styles sits in the last layer and wins. If a theme update ships a new default font and you never see it, open Styles, Typography and reset the element you changed, or pick the new font yourself.

Does deleting a font remove it from the site?

Yes, and from every theme at once. The confirmation reads "Are you sure you want to delete "%s" font and all its variants and assets?", and it means it.

Deleting a wp_font_family post deletes its wp_font_face children (_wp_after_delete_font_family()), and deleting a face deletes its file from uploads/fonts (_wp_before_delete_font_face()).

The editor then removes the font from the current theme's active list. Another theme that still lists it keeps a reference to a file that no longer exists, and its text quietly falls back to the next font in the stack.

So before deleting a font you think is unused, check every theme's global styles, not only the active one.

How do I change fonts in a classic theme?

Many classic themes have their own typography controls under Appearance, Customize. Use those first, since the theme's CSS is written around them.

If the theme has none, install the font in Appearance, Fonts, which classic themes also get. Global styles still apply to classic themes, so the @font-face rules are printed.

But a classic theme's style.css still sets its own font-family, so you have to point text at the new font. Add CSS in Appearance, Customize, Additional CSS:

body {
  font-family: "Inter", system-ui, sans-serif;
}

Use the family name exactly as the Font Library shows it, and keep a fallback stack after it.

Additional CSS is also stored per theme. It is a custom_css post whose slug is the theme's folder name (wp_get_custom_css_post()), so it does not follow you to a new theme either.

Can I turn off the Google Fonts option?

Yes. Core registers the collection on init as google-fonts, and wp_unregister_font_collection() removes it:

add_action( 'init', function () {
    wp_unregister_font_collection( 'google-fonts' );
}, 20 );

Put it in a must-use plugin so a theme switch does not undo it. Uploading your own files still works.

Only users with the edit_theme_options capability can install or delete fonts, which by default means administrators.

Why is my font different on a cloned or migrated site?

Two things to check. First, the files: a migration that copies the database but skips wp-content/uploads/fonts leaves the library and global styles pointing at files that are not there.

Second, the URLs. The font sources saved in global styles are absolute URLs to your uploads folder, so an unreplaced old domain makes the copy load fonts from the original site.

Browsers apply cross-origin restrictions to web fonts, so that request can fail without any visible error, and the text falls back. Open the browser's network tab and filter by "font" to see where the files come from.

The wp_font_face posts store their settings with escaped slashes (https:\/\/example.com\/...), because the font faces controller uses plain wp_json_encode(). A search-replace on the plain URL can miss those rows; our search-replace post covers how to handle both forms.

Should I test a font change on a copy first?

For picking a new heading font on a small site, no. You can see the result in the editor before saving, and the old choice is one click away.

A copy earns its keep when the change touches more than looks. Switching themes, deleting fonts you think are unused, adding a child theme, or tidying up a client site's uploads/fonts folder all change which fonts load, and the failure is silent fallback text, not an error.

The SandyWP Cloner copies a live site's database and wp-content into a disposable sandbox, and only reads from production. Your wp_global_styles posts, font library records and the font files come across together, so the sandbox loads the same fonts the live site does.

From there, SSH access lets you run the WP-CLI commands above against the copy, switch themes, delete the font and look. If you build themes, SandyWP for theme developers syncs a GitHub repo into wp-content/themes, so a theme.json font change can be tried on a fresh install the same way.

If the result is what you wanted, repeat it on production. If it is not, delete the sandbox and nothing on the live site moved.