Guides/Edit your website/Templates/Edit a template

Edit a template

Last reviewed on April 15, 2026

You can edit any template on your site to customize how your pages and posts are laid out. Changes you make to a template affect every page or post that uses it. In this guide, you will learn how to open a template, make changes, save your work, and restore a previous version.

Video tutorial

From the course: Create your website on WordPress.com

Requirements

This guide requires a theme that supports the Site Editor. Check for Appearance → Editor in your site’s dashboard. If you see Customize instead, you’re using a classic theme. Consider switching to a block theme.

The Appearance menu open in the site dashboard, and an arrow pointing to the Editor submenu.

Open a template in the editor

Your theme includes a set of templates that you can edit. To open a template, follow these steps:

  1. Visit your site’s dashboard.
  2. Navigate to Appearance → Editor.
  3. In the left sidebar, click the Templates option.
  4. Click a template thumbnail to open it in the editor.
    • You can also click the ellipsis (three dots) at the top right of a template and select Edit.
The Site Editor open to the Templates menu item and template thumbnails appear on the right.

You can also open a template while editing a page or post:

  1. While editing a page or post, open the settings sidebar.
  2. Click the template name to open the template options.
  3. Click “Edit template” from the menu that appears.
The Template section of the Page Settings sidebar, open to display the template options and an arrow highlighting the "Edit template" option.
  1. Make your changes. They will apply to every page or post that uses this template.
  2. To return to the page or post editor, click ‹ Back next to the template name at the top of the editor.

When you open a template, you will see the template name at the top of the screen and the template type in the Settings sidebar on the right:

The Template Editor highlighting the Template name and the Template section on the sidebar.

Edit the template

To view the structure of your template, click the List View icon at the top left of the screen (it looks like three horizontal lines). List View shows all the blocks in the template and lets you click any block to move, remove, or change it:

The List view open for the Pages template, showing a header, footer and content areas.

Click on any block to adjust its content or settings. Some things you can do include:

Your template likely includes a Content block. This block is a placeholder that shows the specific content you have added to each page or post. If your page is not displaying the expected content, make sure to add the Content block to your template.

Save your changes

When you are finished editing, click Save at the top right of the screen.

A panel will show the templates and template parts affected by your changes. Review them, then click Save again to confirm.

The Templates and Template Parts that will be affected by saving changes in the Template Editor.

Restore a template revision

If you want to undo changes you made to a template, you can restore it to a previous version.

To restore a template revision:

  1. Visit your site’s dashboard.
  2. Navigate to Appearance → Editor.
  3. In the left sidebar, click the Templates option.
  4. Click the three dots () at the top right of a template you want to restore a revision for.
  5. Select the “View revisions” option from the drop-down:
An arrow from the Template options menu to the "View revisions" option.
  1. On the Compare Revisions page, use the slider to browse through previous versions of the template.
  2. When you find the version you want, click “Restore This Revision“.
  3. Click Save to apply the restored version. The template now uses the revision you selected.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!