Fix Guide

How to Add a Meta Description in WordPress

February 8, 2026

WordPress does not output a meta description tag by default. That means unless you add one yourself (or use a plugin that does it for you), search engines will pick whatever text they think best represents your page. Sometimes Google gets it right. Often, it pulls a random sentence or a chunk of navigation text that does not accurately describe your content. Adding a well-written meta description gives you control over how your pages appear in search results and can significantly improve your click-through rate.

Where Meta Descriptions Appear in Search Results

When you search on Google, each result shows a blue title link, a URL, and a short text snippet below it. That snippet is usually the meta description. It is the first impression a searcher has of your page, and it determines whether they click through to your site or skip to the next result. A compelling description that clearly communicates what the page offers will attract more clicks than a vague or auto-generated one. It is worth noting that meta descriptions are not a direct ranking factor. Google does not use them to determine search position. However, a higher click-through rate (CTR) signals to Google that your result is relevant, which can indirectly support your rankings over time.

Optimal Length and Character Count

Google typically displays between 150 and 160 characters of the meta description on desktop, and slightly fewer on mobile (around 120 characters). Aim for descriptions between 120 and 155 characters to avoid truncation on most devices. Do not make them too short either. A description under 70 characters wastes valuable space that could be used to convince the searcher to click. If you use Yoast SEO, the green bar in the snippet preview indicates the optimal length range. Stay within the green zone for best results.

Writing Meta Descriptions That Get Clicks

A good meta description is more than just a summary. It is a mini advertisement for your page. Here are the principles that make descriptions effective:

  • Include your target keyword: When the search query matches words in your meta description, Google bolds those words in the snippet. This visual emphasis draws the eye and increases the chance of a click. Place the keyword naturally, early in the description.
  • Add a call to action: Phrases like "Learn how to," "Discover why," "Get the complete guide," or "Find out the best" encourage action. They tell the searcher what they will get if they click.
  • Make each description unique: Every page on your site should have its own meta description. Duplicate descriptions across multiple pages dilute their effectiveness and can cause Google to ignore them entirely.
  • Match the search intent: If someone searches "how to install WordPress plugin," your description should clearly state that the page explains plugin installation step by step, not just mention plugins in passing.
  • Avoid special characters that get truncated: Quotation marks (especially double quotes) can cause the description to be cut short in some cases. Use single quotes or rephrase if possible.

Adding Meta Descriptions with Yoast SEO

Yoast SEO is the most popular way to manage meta descriptions in WordPress. Here is how to set them up:

Per-Post and Per-Page Descriptions

  1. Install and activate Yoast SEO from the WordPress plugin directory.
  2. Edit any post or page.
  3. Scroll down to the Yoast SEO meta box below the editor (or click the Yoast icon in the sidebar if you use the block editor).
  4. Click "Edit snippet" to expand the snippet preview.
  5. Write your meta description in the "Meta description" field. The color bar below changes from red (too short or too long) to orange (acceptable) to green (optimal length).
  6. You can use snippet variables like %%title%%, %%sitename%%, or %%excerpt%% to dynamically insert content. However, manually written descriptions almost always perform better than automated ones.

Template Descriptions with Variables

For pages that you cannot edit individually (archives, category pages, author pages), Yoast lets you set default templates:

  1. Go to Yoast SEO > Search Appearance.
  2. Click on the content type you want to configure (Posts, Pages, Categories, etc.).
  3. In the "Meta description" template field, use variables like %%excerpt%% or %%term_description%% to generate descriptions automatically.
  4. For categories, Yoast uses the category description you set under Posts > Categories. Make sure each category has a meaningful description filled in.

Adding Meta Descriptions with Rank Math

Rank Math is a strong alternative to Yoast with a similar workflow:

  1. Install and activate Rank Math.
  2. Edit a post or page.
  3. Click the Rank Math icon in the sidebar (or scroll to the Rank Math meta box below the editor).
  4. Click "Edit Snippet" and fill in the "Description" field.
  5. Rank Math also provides a character counter and snippet preview showing how the result will appear on Google.
  6. For global templates, go to Rank Math > Titles & Meta and configure default descriptions per content type.

Bulk Editing Meta Descriptions

If you have hundreds of posts without meta descriptions, editing them one by one is tedious. Here are faster approaches:

  • Yoast SEO Premium: The premium version includes a "Social Previews" and quick-edit column in the posts list where you can update descriptions without opening each post.
  • Rank Math: Even the free version allows bulk editing of SEO titles and descriptions from the posts list.
  • Custom database query: For very large sites, you can use WP-CLI or a custom script to set meta descriptions from the post excerpt. This is an advanced approach and should be tested on a staging site first.

Prioritize your most important pages first: the homepage, top-traffic landing pages, product pages, and key service pages. These are the ones where a good meta description has the biggest impact on clicks.

When Google Ignores Your Meta Description

Even when you write a perfect meta description, Google may choose to display a different snippet. This happens more often than you might expect. Google rewrites meta descriptions in roughly 60 to 70 percent of cases, according to various studies. Here is why it happens:

  • The search query does not match the description: If someone searches for a specific phrase that appears in your page content but not in your meta description, Google will pull a snippet from the page body that contains the matching text.
  • The description is too generic: If your description could apply to any page on the internet, Google may consider it unhelpful and generate its own.
  • The description is a duplicate: If multiple pages on your site share the same meta description, Google is more likely to ignore it.

You cannot prevent Google from rewriting your description, but you can minimize it by writing specific, keyword-rich descriptions that closely match the content and common search queries for each page.

Meta Descriptions for Different Content Types

Different types of pages benefit from different description styles:

  • Blog posts: Summarize the key takeaway. What will the reader learn or gain? Example: "Learn exactly how to configure WP Rocket in 10 minutes. This step-by-step guide covers page caching, browser caching, and CDN integration."
  • Product pages: Highlight the key benefit, price point, or unique selling proposition. Include power words like "free shipping" or "limited offer" if applicable.
  • Category and archive pages: Describe what the category covers and how many resources are available. Example: "Browse 45 in-depth guides on WordPress security, covering firewalls, login protection, file permissions, and more."
  • Service pages: Focus on the problem you solve and the result the visitor can expect. Include a clear call to action.
  • Homepage: Summarize what your site or business does and who it is for. This is often the most important meta description on your entire site.

Common Meta Description Mistakes to Avoid

  • Leaving descriptions empty on important pages: Your homepage, key landing pages, and top-traffic posts should always have manually written descriptions.
  • Keyword stuffing: Cramming multiple keywords into the description makes it unreadable and does not help with rankings. Use one primary keyword naturally.
  • Copying the first paragraph of the content: The first paragraph is often an introduction that lacks the specificity and call-to-action of a good meta description. Write something purposefully different.
  • Using the same description site-wide: Some themes or poorly configured plugins set the same description on every page. This is worse than having no description at all.
  • Exceeding the character limit: Descriptions longer than 160 characters get truncated with an ellipsis, which looks incomplete and can cut off your call to action.

Adding a Meta Description with Custom Code

If you prefer not to use an SEO plugin, you can add meta descriptions programmatically via functions.php:

function custom_meta_description() {
    if (is_singular()) {
        $description = has_excerpt() ? get_the_excerpt() : wp_trim_words(get_the_content(), 25);
        echo '<meta name="description" content="' . esc_attr($description) . '" />' . "\n";
    } elseif (is_front_page()) {
        echo '<meta name="description" content="' . esc_attr(get_bloginfo('description')) . '" />' . "\n";
    } elseif (is_category()) {
        $description = category_description();
        if ($description) {
            echo '<meta name="description" content="' . esc_attr(wp_strip_all_tags($description)) . '" />' . "\n";
        }
    }
}
add_action('wp_head', 'custom_meta_description', 1);

This approach works but lacks the user-friendly interface of a plugin. For most sites, Yoast SEO or Rank Math provides a better experience and more features.

Check Your Meta Descriptions with InspectWP

Run an InspectWP scan to see your meta description content and character count in the SEO section. InspectWP flags pages with missing descriptions, descriptions that are too short, and descriptions that exceed the recommended length. Use this as a quick audit tool to identify which pages need attention. After writing or updating your meta descriptions, run another scan to confirm everything looks correct.

Check your WordPress site now

InspectWP analyzes your WordPress site for security issues, SEO problems, GDPR compliance, and performance — for free.

Analyze your site free