Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Setup & site building · Guide

How to Edit a Block in WordPress (Step by Step)

How to Edit a Block in WordPress (Step by Step)

Short answer

Click the block to select it and change its text or media directly on the page. Use the block toolbar above it for formatting, alignment, transforms and the options menu, and open the Settings sidebar on the right for colors, typography, spacing and block-specific options.

Key takeaways

  • Select a block by clicking it or picking it in List View.
  • The toolbar handles quick actions like transform, align and duplicate.
  • The Settings sidebar holds color, typography and spacing options.
  • Synced patterns change everywhere unless you detach them.
  • Headers, footers and templates are edited in the Site Editor.
  • Locked blocks need their lock removed before you can change them.

How do you edit a block in WordPress?

Click the block to select it, change its content directly on the page, then use the block toolbar above it and the Settings sidebar on the right to change its options and style.

Every piece of content in the block editor is a block, from paragraphs and images to buttons and columns. Editing always starts with selecting the block you want.

Once selected, a block shows two sets of controls. The toolbar holds quick actions, and the sidebar holds detailed settings.

If the editor layout itself is unfamiliar, our explainer on the WordPress block editor shows where each panel sits.

Step 1: How do you select the block you want to edit?

Click inside the block on the page, or open List View from the top toolbar and click the block's name, which is easier for small or nested blocks.

Clicking text puts your cursor inside the block so you can type. Clicking an image or button selects the whole block.

Nested blocks, such as a button inside a group inside columns, are hard to target by clicking. List View shows the full tree so you can pick the exact block.

You can also press Escape while typing to switch to selection mode, then use the arrow keys to move between blocks.

Step 2: How do you change a block's content?

Type, delete or paste directly inside the block, just like in a word processor, and use the toolbar for bold, italic, links and other inline formatting.

Text blocks such as Paragraph, Heading and List are edited in place. Select words and use the toolbar or keyboard shortcuts to format them.

Media blocks have a Replace button in the toolbar. Use it to swap an image or video without losing the block's settings.

The official block editor keyboard shortcuts list covers formatting, selecting and moving blocks without the mouse.

Step 3: What can you do from the block toolbar?

The block toolbar lets you transform the block, move it, change alignment, add formatting or links and open the options menu for actions like duplicate, copy, lock and delete.

From left to right, most toolbars show these parts:

  • Block type icon: click to transform the block, for example a paragraph into a heading or list.
  • Drag handle and arrows: move the block up or down.
  • Block-specific tools: alignment, heading level, image crop, link and similar controls.
  • Options menu (three dots): duplicate, insert before or after, copy, group, lock, edit as HTML and delete.

If the toolbar gets in the way of your writing, you can pin it to the top of the screen. Open the editor's main options menu and turn on the top toolbar setting.

Step 4: How do you use the block Settings sidebar?

Open the sidebar with the Settings icon in the top right, then change options such as color, typography, dimensions, border and block-specific settings for the selected block.

Some blocks split the sidebar into a Settings tab and a Styles tab. Settings holds options like image size or link behavior, and Styles holds color, spacing and typography.

The options you see depend on the block and on what your theme allows. A theme can turn off custom colors or font sizes, so some controls may be missing.

Click the three dots next to a panel heading, such as Typography, to show extra controls like letter spacing or line height.

Many sidebar panels also have a reset option. Use it next to a control to return it to the theme default if a change goes wrong.

The WordPress block editor documentation walks through the sidebar for common blocks.

Step 5: How do you change a block's style?

Pick a preset under Styles in the sidebar, such as rounded or outline, or set colors, spacing and borders yourself for that one block.

Block styles are design variations a block or theme offers. A button may have Fill and Outline, and an image may have Default and Rounded.

For a one-off change, set colors and spacing directly on the block. For a change across the whole site, use the Site Editor's Styles panel instead.

Theme developers can add their own presets. Our guide on registering block styles explains how that works.

What you want to changeWhere to do it
Text, image or linkDirectly in the block or its toolbar
Block typeTransform from the block type icon
Color, spacing, typography for one blockSettings sidebar, Styles tab
Look of every block of one typeSite Editor, Styles, Blocks
Raw markupOptions menu, Edit as HTML
Synced pattern contentEdit original, or detach first
Header or footerSite Editor, Patterns or Templates

How do you edit a block's HTML?

Open the block's options menu and choose Edit as HTML to change its markup directly, then switch back to visual editing when you are done.

This is useful for small fixes, such as adding an attribute or cleaning pasted code. Each block has comment delimiters that the editor needs, so do not delete them.

If the markup no longer matches what the block expects, the editor shows a validation warning. You can then attempt block recovery or convert the block to Custom HTML.

For larger code changes, the Custom HTML block is a safer place to work than editing a standard block.

How do you edit blocks in synced patterns?

A synced pattern shares one copy of its blocks across every page, so click Edit original to change it everywhere, or Detach to make a local copy you can change on one page only.

Synced patterns were previously called reusable blocks. Changing the original updates every page that uses it.

Our guide on synced patterns explains when to keep a pattern synced and when to detach it.

Regular, unsynced patterns are just groups of normal blocks once inserted. Edit them like any other blocks. See how to use block patterns for more.

How do you edit blocks in headers, footers and templates?

In block themes, open Appearance, then Editor, choose the template or template part such as the header, and edit its blocks the same way you edit a post.

Headers, footers and archive layouts are made of blocks too. They live in the Site Editor rather than in each post.

Changes to a template part affect every page that uses it. Our guide on editing the header in a block theme walks through one example.

Classic themes do not use the Site Editor. Their headers and footers are edited in the Customizer, widget areas or theme files.

Why can't you edit a block?

A block may be locked, part of a synced pattern or template, controlled by a plugin, or your user role may not have permission to edit it.

Locked blocks show a padlock in the toolbar or List View. Open the options menu, choose the lock option and clear the lock settings if your role allows it.

Theme authors can lock blocks on purpose to protect a layout. The Block Editor Handbook explains locking for developers.

If the block shows an error instead of content, a plugin that provides it may be deactivated. Reactivate the plugin or replace the block.

When the whole editor fails, see our fix for the editor has encountered an unexpected error.

How do you undo a block edit?

Press Ctrl+Z on Windows or Cmd+Z on a Mac, use the Undo arrow in the top toolbar, or restore an earlier revision if you have already saved.

Undo works step by step through your recent changes in the current session.

Revisions are saved each time you save or update. Open the post settings panel and click Revisions to compare and restore an older version.

Learn more about the editor in the free courses at Learn WordPress, or check the editor's development in the Gutenberg project on GitHub.

To remove a block entirely rather than edit it, see how to delete a block in WordPress.

Frequently asked questions

How do I open block settings in WordPress?

Select the block, then click the Settings icon in the top right corner of the editor to open the sidebar. Some blocks split it into Settings and Styles tabs. If the sidebar is already open, the panel switches to show options for whichever block you select.

How do I change one block type into another?

Select the block and click its icon at the left of the toolbar. A list of compatible block types appears, such as Heading, List or Quote for a paragraph. Choose one and the content moves into the new block type.

Why are some block settings missing?

Your theme may turn off certain controls, such as custom colors or font sizes, through its settings. Some options are also hidden until you open a panel's extra controls menu. Plugins and user roles can limit settings as well.

How do I edit the same block on every page?

If it is a synced pattern, click Edit original and save, and the change appears everywhere. To restyle all blocks of one type, such as every button, use the Site Editor's Styles panel and choose that block under Blocks.

How do I edit a block in the HTML view?

Open the block's three-dot options menu and choose Edit as HTML. Change the markup, then choose Edit visually from the same menu. Keep the block comment lines intact, or the editor may flag the block as invalid.

Sources

  1. WordPress Block Editor WordPress.org Documentation
  2. Keyboard shortcuts in the block editor WordPress.org Documentation
  3. Block Editor Handbook WordPress Developer Resources
  4. Learn WordPress WordPress.org
  5. Gutenberg repository GitHub

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.