How to add and edit a meta description in WordPress

A meta description is a short summary of a page in its HTML. Search engines can show it as the text under your title in the results. WordPress does not write one for you, so you add it with an SEO plugin or a few lines of theme code. Here is how to do both, what to write, and why Google may still show something else.

WordPress does not output a meta description by itself

WordPress core prints a title, a canonical link and a few other tags into the page head, but no <meta name="description">. Some themes add one, many do not. To see what your page has, open it, view the page source and search for name="description". If the tag appears twice, a theme and a plugin are both writing one. Fix that before editing any text.

Edit it in Yoast SEO

Open the page or post in the editor. In the Yoast SEO sidebar, click Search appearance. The snippet editor opens with fields for the SEO title, the slug and the meta description. In the classic editor and in the box below the editor, the field is called Meta description on the SEO tab. To edit many pages in one go, use Yoast SEO, Tools, Bulk editor.

Yoast also shows a length check. It marks a description as too short below 120 characters and too long above 156. Treat that as a guide, not a rule.

Edit it in Rank Math

Open the page or post and click the Rank Math icon at the top right of the editor. The General tab is selected by default. Click the Edit Snippet icon in the search preview. The preview window has fields for the title, the permalink and the description. Rank Math also lets you set default descriptions for whole content types in its Titles and Meta settings.

Add one without a plugin

The wp_head action runs inside the head of your page, and themes and plugins use it to print tags. You can hook a small function onto it that prints <meta name="description" content="...">, with the text passed through esc_attr(). Put it in a child theme or a code-snippets plugin, not in the parent theme, because a theme update overwrites your edit.

Two cautions. If an SEO plugin is active, it already prints the tag, and a second one makes the page ambiguous. And one fixed sentence for every page breaks the rule below. Without a plugin, a hard-coded text suits the home page. For many pages, the function would need to read a per-page value, and at that point a plugin is less work.

What a good meta description looks like

  • Unique per page. Google advises against identical or near-identical descriptions across pages.
  • It describes what is on that page, in plain sentences. Details such as a price, a date or a location help when they apply.
  • No list of keywords. Google notes that these give people no clear idea of the page and are less likely to be shown.
  • Written for the person reading the results, with a clear reason to click.

There is no length limit. Google says the snippet is truncated as needed, typically to fit the device width. Around 150 to 160 characters is a common guide, and mobile results often cut earlier. Put the key point first and do not count characters obsessively.

Why Google shows a different snippet

Google creates snippets mainly from the page content. It uses your meta description when it considers that a more accurate description than the page text. Different searches for the same page can therefore produce different snippets. Google cannot be forced to show yours. A description that matches what the page really says is shown more often.

The meta description is not updating

Check in this order. First, view the page source in a private window. If the old text is there, the problem is on your site, not in Google. Second, clear the page cache and the CDN cache, since a cached copy keeps serving the old tag. Third, look for a second description tag. A theme, a page builder or another SEO plugin may print its own, and the plugin you edit may not be the one that wins.

If the source shows the new text, the rest is up to Google. It has to crawl the page again and then decide to show it. In Search Console, the URL Inspection tool lets you request a recrawl. Google says this can take several days to a few weeks and that repeated requests for one URL do not speed it up.

Questions

Do I need a plugin to add a meta description?
No. A function on the wp_head action works. For more than a few pages, an SEO plugin gives you a field per page and is the simpler route.
How long should a meta description be?
Google sets no limit and shortens snippets to fit the width of the result. About 150 to 160 characters is a common guide.
Should I write a description for every page?
Yes for pages you want found. Write each one for its page. Leaving the field empty is better than copying one text everywhere, since Google then builds the snippet from the page itself.

Sources

More guides