← Back to blog

How to edit the homepage in WordPress, and which template is really drawing it

The SandyWP team 7 min read

To edit your WordPress homepage, first open Settings, Reading and look at Your homepage displays. If it says A static page, edit the page named next to Homepage in Pages; if it says Your latest posts, the homepage is a template, and you edit it in Appearance, Editor (block themes) or Appearance, Customize (classic themes).

Most "my homepage edit did nothing" problems come from editing the wrong one of those. The rest of this post is how to tell which object is drawing the homepage, how to change it, and the three cases where WordPress quietly ignores what you edited.

How do I change which page is the homepage?

Go to Settings, Reading, choose A static page (select below), pick a page in the Homepage dropdown, and save. Optionally pick a different page under Posts page to hold the blog.

Those controls write three options: show_on_front (posts or page), page_on_front (the homepage's page ID) and page_for_posts (the posts page ID). Everything else in this post follows from those three values.

On a block theme you can also do it from the Site Editor. Open Appearance, Editor, Pages, open a published page's actions menu and choose Set as homepage or Set as posts page.

WordPress asks Set "About" as the site homepage? and saves the same two options the Reading screen does. The pages list then shows a Homepage or Posts Page badge next to the current ones, which is the quickest way to see the setting without leaving the editor.

On a classic theme the same controls sit in Appearance, Customize, Homepage Settings, with a live preview.

From the command line:

wp option get show_on_front
wp option get page_on_front
wp post list --post_type=page --fields=ID,post_title,post_status
wp option update show_on_front page
wp option update page_on_front 42

How do I edit the homepage if it is a static page?

Open Pages, find the page the Reading screen names, and edit it like any other page. Whatever you put in the page content appears on the homepage.

Visiting that page's own URL (say /home/) redirects to the site root. That is WordPress's canonical redirect, not a broken page: a static homepage only has one address.

The header and footer around the page content come from the theme, not the page. To change those, edit the template parts in the Site Editor; our post on editing the footer covers where those edits are saved and what they override.

How do I edit the homepage if it shows latest posts?

There is no page to open. The homepage is drawn by a template, so on a block theme you edit it in Appearance, Editor, Templates.

Which template depends on what the theme ships. Twenty Twenty-Five 1.5, the current default theme, has a home.html template, which the Site Editor calls Blog Home, and no front page template.

So on a fresh install, editing Blog Home changes the homepage.

On a classic theme the homepage is home.php or index.php in the theme folder. Change it with a child theme, or with whatever homepage options the theme adds to the Customizer.

Why does my homepage not change after I edit it?

Usually one of four things is drawing the homepage instead of what you edited.

A Front Page template overrides everything

WordPress checks for a front page template before it looks at anything else. Core's own description of it says: "The Front Page template takes precedence over all templates."

That holds whether the Reading setting is a static page or latest posts. If a front-page.html file exists in the theme, or someone created a Front Page template in the Site Editor, it draws the homepage.

The consequence is easy to miss. If that template has no Content block, the content of your static homepage page is never output, however many times you edit and save it.

The template order for the homepage is front page, then Blog Home, then Index. Open Appearance, Editor, Templates and look for a template named Front Page before you edit anything else.

You edited the posts page

The page you choose as Posts page is a placeholder. WordPress uses its URL and title, and then renders the Blog Home template (or Index) with the latest posts.

The page's own content is not shown.

The template you pick for that page is ignored too. A core ticket asking for the posts page to honour its chosen template, #55035, was closed as invalid, with the reply that the posts page always uses the template hierarchy "and is not different between the classic themes and block themes."

The classic editor at least warns you: open the posts page with no content in it and you get "You are currently editing the page that shows your latest posts." and no content box.

The homepage page went to the trash

Trashing the page set as homepage runs _reset_front_page_settings_for_post(). It sets show_on_front back to posts and page_on_front to 0, so the site silently switches to showing latest posts.

Restoring the page from the trash does not put the setting back. That hook runs on trash and on delete, and nothing reverses it on restore, so after an accidental trash you have to set the homepage again in Settings, Reading.

Trashing the posts page clears page_for_posts the same way.

A cache is serving the old homepage

The homepage is the most cached URL on most sites. A page cache plugin, the host's cache or a CDN can keep serving the old version to logged-out visitors while you see the new one logged in.

Purge the cache and check in a private window. Our guide to clearing the WordPress cache covers each layer.

Can the homepage and the posts page be the same page?

No. If you choose the same page for both, the Reading screen shows "Warning: these pages should not be the same!" Pick two different pages.

The Site Editor's Set as homepage and Set as posts page actions do not offer a page that already holds either role, which avoids it.

What happens if I pick a static page but leave the dropdown empty?

WordPress corrects it. If show_on_front is page but neither a homepage nor a posts page is set, loading the Reading screen switches it back to posts.

If only the posts page is set, the homepage shows latest posts and the posts page shows them too. That is rarely what anyone wanted, so pick both.

How do I find out what is drawing the homepage right now?

Run through this in order, logged out where it matters:

  1. Settings, Reading. Latest posts or a static page, and which page.
  2. Appearance, Editor, Templates. Is there a Front Page template? If yes, that is your homepage, whatever step 1 said.
  3. If not, and step 1 says latest posts, the Blog Home template draws it, or Index if the theme has no Blog Home.
  4. If not, and step 1 says a static page, the page's own template (usually Pages) draws it, with the page content in the Content block.
  5. Purge caches and load the homepage in a private window.

Over WP-CLI you can check for a Front Page template saved in the database, which is the one that does not show up in the theme folder:

wp post list --post_type=wp_template --fields=ID,post_name,post_status
ls wp-content/themes/$(wp option get stylesheet)/templates/

A front-page row in the first list or a front-page.html in the second means the front page template is in charge.

Should I edit the homepage on the live site?

For a text change on a static page, yes. Pages have revisions, so a bad edit can be rolled back, and Preview shows the change before you click Update.

Templates are different. A Site Editor save goes live immediately with no draft step, and changing the Reading setting or adding a Front Page template swaps the whole homepage at once.

So for a redesign, or anything involving templates, work on a copy. On SandyWP you can clone the live site into a sandbox, change the Reading setting or build a Front Page template there, and check the result with the commands above over SSH and WP-CLI.

When it looks right, repeat the change on production. Theme developers testing how their templates behave under both Reading settings can do the same on a throwaway install, flipping show_on_front with one command.

Quick answers

  • Where is the homepage setting? Settings, Reading, under Your homepage displays.
  • Why does my homepage show blog posts? show_on_front is posts, or the homepage page was trashed, which resets it.
  • Why do my page edits not appear on the homepage? A Front Page template is drawing it, or you edited the posts page, or a cache is serving the old version.
  • Which template draws the posts page? Blog Home, then Index. Not the template you chose for that page.