Skip to content

WordPress Line Spacing: How to Change Line Height (5 Ways)

Flat text lines icon with vertical arrow beside the title How to Change Line Spacing in WordPress

WordPress line spacing is set with the Line height control, which you find in a block’s Typography panel. On WordPress 7.1.3 that control is hidden until you turn it on, which is why many people think it is missing.

I tested every method in October 2026 on WordPress 7.1.3 with Twenty Twenty-Five and with a bare classic theme I built for the test. I measured the results in the browser. The numbers below come from real pages and not from theme notes.

This guide shows how to change line spacing for one block, for the whole site and with CSS. It also explains why the option disappears, how to fix big gaps between lines and which value to choose.

What Is WordPress Line Spacing?

WordPress line spacing is the vertical space between lines of text inside one block, and CSS calls it line height. A value of 1.5 makes each line one and a half times as tall as the font size. Paragraph spacing is a separate setting that controls the gap between blocks. For font choices that load fast, see the best fonts for WordPress.

The WordPress typography settings guide says the default line height for most themes is 1.5. Twenty Twenty-Five uses less, and its theme.json file sets body text to 1.4 and headings to 1.125.

The value has no unit by default, and that is the safest choice. MDN’s line-height reference calls a unitless number the preferred way to set it, because it scales with the font size of each element.

In my test, a 1.4 line height on 21.8 px text gave lines 30.6 px tall. Changing it to 1.8 made them 39.3 px tall, which is exactly 1.8 times the font size.

The same control sets the gap when you put two lines of text in a WordPress header, such as a name and a tagline.

Line Spacing vs Paragraph Spacing vs Letter Spacing

Line spacing, paragraph spacing and letter spacing control three different gaps, and mixing them up sends you to the wrong setting. Line height sets the space between lines in a block. Block spacing sets the gap between blocks, and letter spacing sets the gap between characters.

  • Line height: The space between lines inside one paragraph as set in the Typography panel.
  • Block spacing: The gap between two blocks, set in Styles under Layout, or by the theme.
  • Letter spacing: The space between characters as set next to Line height.

Twenty Twenty-Five sets block spacing to 1.2rem, which was 19.2 px on my test site. That gap sits between every pair of paragraphs, whatever line height you choose.

Search results for line spacing WordPress settings often mix these three up, which is why so many fixes fail.

So if your text looks too spread out between paragraphs, line height is the wrong fix. Change the block spacing or use a line break instead, as shown later in this guide.

Line height works together with line length. Check the standard website page width as well.

How to Change Line Spacing in WordPress for One Block

To change line spacing in WordPress for one block, select the block and open its Typography options menu. Turn on Line height and then type a value such as 1.6 or 1.8. The editor saves it on that block only. The rest of the post keeps the theme’s default.

Follow these steps:

  1. Open the post, click the paragraph and make sure the Settings sidebar is open.
  2. In Typography, click the three dots and choose Line height.
    Line height in the WordPress Typography menu
  3. Type a value in the Line height field.
    WordPress line spacing set with Line height
  4. Click Save or Update to keep the change.

WordPress stores the value in the block itself. In my test, the saved markup read <p style="line-height:1.8">, with the same value in the block comment above it.

Here is the result on the front end, with the theme default above and 1.8 below.

WordPress line height 1.4 compared with 1.8 on the front end

The same control works in headings, lists, quotes and most text blocks. Each block keeps its own value. You can loosen a long quote without touching the rest of the post.

Why the Line Height Option Is Missing

The Line height option goes missing for two reasons. On block themes it is simply hidden in the Typography options menu until you turn it on. On classic themes it does not exist unless the theme adds support for it, and many older themes never did.

The first case catches most people. When I selected a paragraph in Twenty Twenty-Five, the Typography panel showed only Color and Font size. Line height appeared after I ticked it in the three dot menu.

The second case needs a theme change. I built a bare classic theme with no editor support flags, and its Typography menu had no Line height item at all.

Classic theme typography menu without the line height option

Adding one line of theme support brought it back. I placed this code in the test theme’s functions.php file:

add_action( 'after_setup_theme', function () {
	add_theme_support( 'custom-line-height' );
} );

After a reload, Line height appeared in the menu between Appearance and Letter spacing.

Classic theme menu showing line height after adding theme support

Add this code to a child theme instead of the parent theme to keep a theme update from removing it. If your theme already uses theme.json, set the option there instead as shown in the developer section below.

How to Change Line Spacing for the Whole Site

To change line spacing for the whole site on a block theme, open the Site Editor styles. Go to Appearance > Editor > Styles > Typography > Text and change Line height. The new value applies to every paragraph that has no line height of its own.

WordPress Site Editor Styles text line height setting

On my test site the field showed 1.4, the Twenty Twenty-Five default. I changed it to 1.6, clicked Review 1 change and then clicked Save.

The front end then showed something useful. The first paragraph moved to 1.6, but the paragraph I set to 1.8 earlier stayed at 1.8. A block’s own value always wins over the global style.

That order helps when you plan changes. Set the site-wide value first and then adjust single blocks only where a design needs more or less space.

The same Typography screen also has Headings, Links, Captions and Buttons. Headings need a smaller value than body text, because large type with loose spacing looks broken apart.

If your post text uses a specific size, also check our guide on how to change font size in WordPress. Size and line height work together. Change them in the same pass.

If you cannot find it, here is where the Styles tab in WordPress lives and how to open it.

How to Change Line Spacing With CSS

CSS changes line spacing on any theme, including classic themes without editor controls. Add a rule such as p { line-height: 1.7; } under Additional CSS. In my test it changed every paragraph except the one with its own block value, because inline block styles win over a stylesheet rule.

On a classic theme, go to Appearance > Customize > Additional CSS. On a block theme, use Appearance > Editor > Styles > the three dot menu > Additional CSS.

WordPress Customizer Additional CSS with a line height rule

After I published the rule, the plain paragraph measured 27.2 px per line on 16 px text, which is 1.7. The paragraph with a block value of 1.8 still measured 28.8 px per line.

Target only the content if your menus and footer should stay as they are:

.entry-content p,
.wp-block-post-content p {
	line-height: 1.7;
}

Open your browser’s developer tools to find the right class. Right-click the text, choose Inspect, and read the class names on the elements around the paragraph.

How to Set Line Height in theme.json

Theme developers set line height in theme.json, which controls both the default value and whether the control appears for editors. The setting typography.lineHeight turns the control on. The style styles.typography.lineHeight sets the default value that every page on the site starts with.

The global settings and styles guide says appearanceTools turns on the line height control along with other design tools. Twenty Twenty-Five sets appearanceTools to true, which is why the option exists behind its menu.

{
	"version": 3,
	"settings": {
		"typography": { "lineHeight": true }
	},
	"styles": {
		"typography": { "lineHeight": "1.6" }
	}
}

Child themes can override these values with their own theme.json file, which WordPress merges with the parent file.

Use a child theme for these changes too. A value you set in the Site Editor is saved in the database and overrides the theme file. Check both places when a value will not change.

If you are curious how theme files load in the first place, our explainer on what index.php does in WordPress covers the template order.

How to Fix Big Gaps Between Lines

Big gaps between lines usually come from pressing Enter instead of from line height. Enter starts a new paragraph block, which adds the theme’s block spacing above it. Press Shift and Enter instead to add a line break inside the same paragraph, which keeps the normal line height.

I measured both on Twenty Twenty-Five. Two lines joined by Shift and Enter sat 32 px apart. The same two lines as separate paragraphs sat 51 px apart, because 19.2 px of block spacing was added on top.

WordPress Shift and Enter line break compared with a new paragraph

Use line breaks for addresses, opening hours and short lists of lines that belong together. Use new paragraphs for separate ideas, because screen readers and search engines read each block as its own paragraph.

If paragraphs pasted from a word processor look double spaced, they may contain empty paragraphs. Open the List View and delete the empty blocks between them.

What Line Height Should You Use?

Use a line height of at least 1.5 for body text, and between 1.6 and 1.8 for long articles. MDN recommends at least 1.5 for main paragraph text. Headings can go lower, around 1.1 to 1.3, because large letters need less space between lines.

WordPress line spacing values reference

Accessibility rules point the same way. WCAG 2.2 success criterion 1.4.12 Text Spacing requires that content still works when a user sets line height to 1.5 times the font size. Your own value can differ, but nothing should break at 1.5.

Twenty Twenty-Five’s 1.4 sits below that recommendation. On a text-heavy site, raising the global value to 1.5 or 1.6 is an easy readability win.

Test the result with real content instead of placeholder text. Read a full section on a phone and a laptop before you settle on a number.

How to Change Line Spacing on Mobile

WordPress has no separate mobile line height control in the editor. Use a short CSS rule with a media query. Small screens usually need slightly less spacing than desktops because lines are shorter. A rule that applies below 600 px wide handles most phones.

@media (max-width: 600px) {
	.wp-block-post-content p {
		line-height: 1.6;
	}
}

Add it under Additional CSS like the earlier rule. Then check the page on a real phone or with the device toolbar in your browser’s developer tools.

Fluid font sizes in block themes also shrink text on small screens. The unitless line height follows the font size automatically. You rarely need large changes.

People who look up how to adjust line spacing in WordPress for phones often find the text cramped after a theme switch. Check the font size first, because a small size with a tight line height reads worst on a narrow screen.

Keep the mobile rule close to the desktop value. A drop from 1.7 to 1.6 is usually enough, while a drop to 1.2 makes long paragraphs hard to follow with a thumb scrolling past.

Common Mistakes When You Change Line Spacing in WordPress

Most line spacing problems come from changing the wrong setting or from a value that something else overrides. A block value overrides the global style, and an inline style overrides a stylesheet rule. A cached page can also show the old spacing after you save.

  • Using px values: A fixed value such as 24px does not scale with the font size. Headings and small text break.
  • Editing the parent theme: A theme update removes the change. Use a child theme or Additional CSS.
  • Fighting a block value: Clear the block’s own line height with Reset all if the global style seems ignored.
  • Forgetting the cache: Clear your page cache and test in a private window after the change.
  • Spacing headings like body text: A 1.8 line height on large headings splits them into separate-looking lines.

Readable text also helps the rest of your site work. A chatbot window or a support widget inherits your text styles. Check those after a global change. Our guide to WordPress chatbot plugins lists widgets that let you adjust their own fonts.

Keep a note of each style change and the date. A WordPress care plan includes this kind of change log, along with backups before theme edits.

Conclusion

WordPress line spacing lives in the Line height control, which is hidden behind the Typography options menu on block themes. Turn it on, type a value, and the block keeps its own setting.

For the whole site, set Line height in Styles > Typography > Text. Remember that a block’s own value wins over the global value, and an inline value wins over Additional CSS.

Choose at least 1.5 for body text and use Shift and Enter for line breaks. Those two habits fix most spacing complaints before you write a line of CSS.

Frequently Asked Questions (FAQs)

Q1. How do I change line spacing in WordPress?

Select the block, open the Typography options menu in the sidebar and turn on Line height. Type a value such as 1.6 and then save the post. For the whole site, use Appearance > Editor > Styles > Typography > Text.

Q2. Why can’t I see the line height option in WordPress?

On block themes, the option is hidden until you tick it in the Typography options menu. On classic themes, it appears only when the theme adds custom-line-height support. You can add that support in a child theme’s functions.php file.

Q3. How do I reduce the space between lines in WordPress?

Lower the Line height value, for example from 1.8 to 1.5. If the big gap is between paragraphs, use Shift and Enter for a line break instead. You can also lower the block spacing in the Site Editor styles.

Q4. What is the best line height for WordPress?

Use at least 1.5 for body text, as MDN recommends and WCAG tests. Long articles read well at 1.6 to 1.8. Headings need less, usually 1.1 to 1.3.

Q5. How do I adjust line spacing in the Classic Editor?

The Classic Editor has no line height button. Add a CSS rule such as .entry-content p { line-height: 1.6; } under Appearance > Customize > Additional CSS. The rule applies to every post that uses the theme’s content class.

Q6. Does line height affect SEO?

Not directly, because search engines do not rank pages by line height. Readable spacing keeps visitors reading longer, and that helps the page do its job. It also meets the WCAG text spacing test, which makes the page easier to use.

Yash Kapoor
Yash Kapoor

Yash Kapoor is the founder and WordPress expert at DevDiggers, where he builds WordPress and WooCommerce plugins for loyalty programs, point-of-sale systems, digital wallets and affiliate management. He writes about developer tools, site performance and the technical side of running a WordPress store. He draws on years of building and maintaining production plugin codebases.

Leave a Reply

Your email address will not be published. Required fields are marked *