Skip to content

WordPress SEO Plugins — Yoast SEO and Rank Math Complete Setup Guide

DodaTech Updated 2026-06-27 16 min read

In this tutorial, you'll learn to optimize your WordPress site for search engines using Yoast SEO or Rank Math, including XML sitemaps, meta titles, Open Graph tags, schema markup, content analysis, and advanced SEO features.

What You'll Learn

  • Why you need an SEO plugin even though WordPress is already SEO-friendly
  • How to run the Yoast SEO setup wizard step by step
  • How to run the Rank Math setup wizard step by step
  • How to generate and submit XML sitemaps to Google Search Console
  • How to write effective meta titles and descriptions using template variables
  • How to configure Open Graph tags for Facebook and Twitter card previews
  • How to enable and customize breadcrumbs in your theme
  • How to set up schema markup (Article, Product, FAQ, LocalBusiness)
  • How to use content analysis for readability and keyword optimization
  • How to use the redirect manager for 301 redirects
  • How to use internal linking suggestions
  • How to edit titles and descriptions in bulk
  • How to preview social shares
  • How to optimize categories and tags for search engines

Why It Matters

WordPress is built with clean code, semantic HTML, and proper heading structures — that's why it already ranks well out of the box. But an SEO plugin gives you granular control over every piece of SEO metadata on your site. Without one, you can't set custom meta descriptions, generate XML sitemaps for Google, add schema markup for rich snippets, or analyze your content for keyword optimization. An SEO plugin is the difference between a site that ranks and a site that gets buried on page 5.

Real-World Use

A small law firm's website has 20 practice area pages, a blog with 50 articles, and an About page. Without an SEO plugin, each page has a generic title and no meta description. With Yoast SEO, the firm sets custom titles and descriptions per page, generates a sitemap submitted to Google, adds LocalBusiness schema to appear in local search results, and uses content analysis to improve their blog articles. Within 3 months, organic traffic increases by 40 percent.

Learning Path

flowchart LR
    A[Essential Plugins] --> B[SEO Plugins]
    B --> C[Contact Forms]
    B --> D[Security Plugins]
    B --> E[Backup & Migration]
    B --> F[Page Builders]
    B --> G[Caching Plugins]

Why WordPress Needs an SEO Plugin

WordPress does many SEO-friendly things automatically:

  • Clean permalink structure
  • Proper heading hierarchy (H1, H2, H3)
  • Semantic HTML5 markup
  • Fast page loading with good hosting
  • Mobile-responsive themes

But WordPress does NOT handle these critical SEO tasks:

  • XML sitemaps for search engines
  • Custom meta titles and descriptions for each page
  • Open Graph tags for social media sharing
  • Schema markup for rich search results
  • Content analysis for keyword optimization
  • 301 redirect management
  • Canonical URLs to prevent duplicate content

An SEO plugin fills all these gaps in one package.

Yoast SEO Setup Wizard

When you first activate Yoast SEO, it runs a setup wizard that asks you several questions.

Step 1: General Settings

The wizard asks about your site's general SEO preferences:

// Yoast stores configuration in WordPress options
// Each setting can be overridden programmatically
add_filter('wpseo_titles', function($options) {
    $options['title-home-wpseo'] = '%%sitename%% - %%sitedesc%%';
    return $options;
});

Step 2: Person or Organization

Tell Yoast whether your site represents a person or an organization. This affects how Google displays your site in search results (Person or Organization schema).

  • Person: For personal blogs, freelancers, individual authors
  • Organization: For businesses, agencies, multi-author sites

Step 3: Social Profiles

Add links to your Facebook, Twitter, Instagram, LinkedIn, YouTube, and Pinterest profiles. This helps Google associate your social presence with your website.

Step 4: Site Visibility

Yoast asks if you want search engines to index your site. During development, set this to "No" to block search engines. For live sites, set it to "Yes."

Rank Math Setup Wizard

Rank Math's setup wizard is similar but includes a few extra steps.

Step 1: Import from Another SEO Plugin

Rank Math can import all your settings from Yoast SEO, All in One SEO, or SEO Framework. This makes switching easy:

// Rank Math import runs automatically during setup
// It migrates: meta titles, descriptions, sitemap settings, social settings
// No manual reconfiguration needed for existing content

Step 2: Configure Your Site Type

Rank Math asks what type of site you run (Blog, Shop, News, Business) and pre-configures settings based on your answer:

  • Blog: Optimizes for articles, categories, and tags
  • Shop: Enables WooCommerce SEO settings automatically
  • Business: Focuses on Local SEO and schema
  • News: Enables News sitemap

Step 3: Enable Features

Rank Math has modular features you can toggle on and off:

  • Redirections: Built-in 301 redirect manager
  • Schema Markup: 20+ schema types
  • Local SEO: Google My Business integration
  • News Sitemap: For news sites
  • Video Sitemap: For video content
  • Analytics: Google Search Console data in dashboard

XML Sitemaps

An XML sitemap is a file that lists all the pages on your site and tells Google when they were last updated. Both plugins generate sitemaps automatically.

Yoast SEO

// Yoast generates: /sitemap_index.xml
// This index file lists all your sitemaps:
// - /post-sitemap.xml (posts)
// - /page-sitemap.xml (pages)
// - /category-sitemap.xml (categories)
// - /post_tag-sitemap.xml (tags)

The sitemap is generated on the fly using WordPress rewrite rules. You don't need to create files or set up Cron Jobs.

Rank Math

// Rank Math generates: /sitemap_index.xml
// Similar structure but includes more sitemap types:
// /sitemap.xml redirects to the correct sitemap index

Submitting to Google Search Console

  1. Go to [search.google.com/search-console]
  2. Add your site property
  3. Go to Sitemaps section
  4. Enter your sitemap URL: https://yoursite.com/sitemap_index.xml
  5. Click Submit
flowchart TD
    A[Install SEO Plugin] --> B[Sitemap Generated Automatically]
    B --> C[Submit to Google Search Console]
    C --> D[Google crawls and indexes your pages]
    D --> E[Check Coverage Report in Search Console]
    E --> F{Errors found?}
    F -->|Yes| G[Fix errors and re-submit]
    F -->|No| H[Your pages are indexed]

Sitemap Best Practices

  • Your sitemap should include all pages you want indexed
  • Exclude thin content pages, tag archives (if they're duplicates), and pages behind login
  • Limit sitemaps to 50,000 URLs or 50MB (WordPress rarely hits this)
  • Submit only the index file to Google — it reads the child sitemaps automatically

Meta Titles and Descriptions

Every page on your site should have a unique meta title and description. These are the blue link and the snippet text that appear in Google search results.

Template Variables

Both Yoast and Rank Math use template variables to dynamically generate titles:

// Common template variables in Yoast and Rank Math
%%title%%         // The post or page title
%%sitename%%      // Your site name
%%sep%%           // Separator (default: | or -)
%%sitedesc%%      // Your site tagline
%%category%%      // Post category
%%pt_single%%     // Custom post type singular label
%%page%%          // Page number (for paginated archives)

Yoast Title Template Example

%%title%% %%sep%% %%sitename%%
// Output: "What is SEO | My Website Name"

Rank Math Title Template Example

%title% - %sitename%
// Output: "What is SEO - My Website Name"

Writing Effective Meta Descriptions

A good meta description:

  • Is 140-160 characters long (Google truncates beyond this)
  • Includes the target keyword naturally
  • Tells the reader what they'll find on the page
  • Includes a call to action or value proposition
<!-- Good meta description -->
<meta name="description" content="Learn how to optimize your WordPress site for search engines with our complete SEO guide. Covers sitemaps, meta tags, schema, and content analysis." />

<!-- Bad meta description — too short, no keywords -->
<meta name="description" content="Welcome to our website. We have lots of great content." />

Per-Page Editing

In the WordPress editor, both plugins add a meta box below the content area. For each page and post, you can set:

  • Focus keyphrase: The primary keyword you want this page to rank for
  • SEO title: Override the default title template
  • Meta description: Write a unique description
  • Slug: The URL slug

Open Graph Tags

Open Graph tags control how your content appears when shared on Facebook, LinkedIn, and Twitter.

Why Open Graph Matters

Without Open Graph tags, when someone shares your page on social media, the platform guesses which image and description to use. Often it picks the wrong image or a random snippet of text. Open Graph tags tell social platforms exactly what to display:

<!-- Open Graph tags set by Yoast or Rank Math -->
<meta property="og:title" content="Your Post Title" />
<meta property="og:description" content="Your meta description" />
<meta property="og:image" content="https://yoursite.com/featured-image.jpg" />
<meta property="og:url" content="https://yoursite.com/post/" />
<meta property="og:type" content="article" />

<!-- Twitter Card tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Your Post Title" />
<meta name="twitter:description" content="Your meta description" />
<meta name="twitter:image" content="https://yoursite.com/featured-image.jpg" />

Setting Open Graph in Yoast

Yoast's Social tab in the meta box lets you preview how your content looks on Facebook and Twitter. You can upload a different social image than your featured image if needed.

Setting Open Graph in Rank Math

Rank Math's social preview panel shows a live preview of Facebook, Twitter, and even WhatsApp share appearance.

Breadcrumbs are navigational links that show the user where they are in your site hierarchy:

Home > Blog > SEO > WordPress SEO Plugins

Enabling Breadcrumbs in Yoast

  1. Go to SEO > Search Appearance > Breadcrumbs
  2. Enable breadcrumbs
  3. Add this code to your theme where you want breadcrumbs to appear:
<?php
if (function_exists('yoast_breadcrumb')) {
    yoast_breadcrumb('<p id="breadcrumbs">', '</p>');
}
?>

Enabling Breadcrumbs in Rank Math

  1. Go to Rank Math > General Settings > Breadcrumbs
  2. Enable breadcrumbs
  3. Use the Rank Math breadcrumb shortcode or template tag:
<?php
if (function_exists('rank_math_the_breadcrumbs')) {
    rank_math_the_breadcrumbs();
}
?>

Schema Markup

Schema markup is structured data that helps Google understand your content and display rich results — star ratings, prices, FAQs, event dates, and more.

Common Schema Types

  • Article: Standard article schema (set by default)
  • Product: Price, availability, reviews for e-commerce
  • FAQ: Question and answer pairs (auto-generated from WordPress FAQ blocks)
  • LocalBusiness: Address, phone, hours for local businesses
  • Recipe: Cooking time, ingredients, nutrition
  • Event: Date, location, ticket URL

Setting Schema in Yoast

Yoast automatically adds Article schema to posts. For other types, you can change schema per page:

  1. Open the post/page editor
  2. Scroll to the Yoast meta box
  3. Go to the Schema tab
  4. Select the schema type (Article, FAQPage, Product, etc.)
// Change the default schema type for a specific post type
add_filter('wpseo_schema_graph_pieces', function($pieces, $context) {
    // Custom schema modifications
    return $pieces;
}, 10, 2);

Setting Schema in Rank Math

Rank Math detects schema automatically based on content:

// Force FAQ schema on a page with Rank Math
add_filter('rank_math/schema/type', function($type, $class) {
    if (is_page('faq')) {
        return 'FAQPage';
    }
    return $type;
}, 10, 2);

Content Analysis

Both plugins analyze your content and give real-time feedback on SEO and readability.

Yoast Content Analysis

Yoast scores content with a traffic light system:

  • Green (good): Your content is well-optimized
  • Orange (okay): Some improvements needed
  • Red (poor): Significant optimization needed

Factors analyzed:

  • Keyword density: Is your focus keyphrase used enough times?
  • Keyword in title: Is the keyphrase in the SEO title and the visible heading?
  • Keyword in first paragraph: Google gives extra weight to the first 100 words
  • Keyword in headings: Are subheadings using the keyphrase?
  • Image alt text: Do images have the keyphrase in their alt attributes?
  • Internal links: Does the page link to other pages on your site?
  • Outbound links: Does the page link to authoritative external sources?

Rank Math Content Analysis

Rank Math shows similar analysis but with a percentage score:

// Rank Math content analysis feedback
// "Keyphrase in title" - check
// "Keyphrase in first paragraph" - check
// "Keyphrase in headings" - add your keyphrase to a subheading
// "Content length" - your content is 850 words (minimum: 600)
// "Readability" - score: 85/100 (good)

Readability Analysis

Both plugins calculate the Flesch Reading Ease score:

  • 90-100: Very easy (5th grade level)
  • 60-70: Standard (8th-9th grade)
  • 0-30: Very difficult (college graduate)

For most web content, aim for 60-80 (easy to read).

Redirect Manager

When you change a page's URL or delete a page, the old URL breaks (404 error). A 301 redirect sends visitors from the old URL to the new one automatically.

Yoast Redirect Manager

The redirect manager is a premium feature in Yoast.

Rank Math Redirect Manager

Rank Math includes a free redirect manager:

// Programmatically add a redirect in Rank Math
add_action('init', function() {
    $redirects = array(
        array(
            'url_to'      => '/new-url/',
            'url_from'    => '/old-url/',
            'type'        => 301,
        ),
    );
    // Redirects are stored in the database and checked on every request
});

Common Redirect Use Cases

  • Changing a permalink structure
  • Merging two pages into one
  • Moving a site to a new domain
  • Fixing broken links from external sites
  • Redirecting old blog posts to newer versions

Bulk Editor

When you need to change titles or descriptions across many pages, doing it one by one is impractical. The bulk editor (available in Yoast Premium and Rank Math free) lets you update multiple pages at once.

Using the Bulk Editor

  1. Go to Yoast SEO > Tools > Bulk Editor or Rank Math > Edit Titles & Meta
  2. See a table of all your pages and posts
  3. Edit titles, descriptions, and slugs directly in the table
  4. Save all changes at once

Social Previews

Before sharing a page on social media, you want to see how it looks. Both plugins offer live social previews:

  • Facebook preview: Shows the title, description, image, and domain
  • Twitter preview: Shows the card layout
  • Google preview: Shows how your page looks in search results

SEO for Categories and Tags

Category and tag archives are often overlooked for SEO. Both plugins let you optimize them.

Category SEO

// In Yoast, category archives get their own SEO settings
// Set a meta description for "Technology" category:
// "Browse our technology articles covering AI, cloud computing, and cybersecurity."
  • Category description: Write a description that appears on the archive page
  • Category title: Use template variables to create unique titles
  • Category robots: Choose whether to index the archive

Tag SEO

Tag archives are often thin content pages. Consider whether you want them indexed. In most cases, set tags to "noindex" to prevent duplicate content issues.

Common Mistakes

  1. Using the same meta description for every page. Each page needs a unique description. Duplicate descriptions tell Google the pages are the same. Write a unique 150-character summary for every page and post.

  2. Ignoring the focus keyphrase. The content analysis exists to help you optimize. If you write content without a target keyword, you're writing blind. Always set a focus keyphrase before writing, then check the analysis for improvement suggestions.

  3. Over-optimizing keyword density. Writing a keyword 20 times in a 500-word article destroys readability and triggers Google spam filters. Use the keyword naturally, include synonyms and related terms, and write for humans first.

  4. Not submitting the sitemap. Generating a sitemap is useless if you don't submit it to Google Search Console. Submitting the sitemap tells Google about your pages and when they were updated. Without it, Google discovers new pages more slowly.

  5. Using both Yoast and Rank Math simultaneously. This is the most common support request for both plugins. They both try to set meta tags, generate sitemaps, and add schema. The result is conflicting code in your page head section. Pick one and delete the other.

Practice Questions

  1. You install an SEO plugin and notice no improvement in rankings after 2 weeks. Is this expected? What SEO factors take more time to show results?

  2. A client has 10 pages with identical meta descriptions. How would you use the bulk editor to fix this, and what would you write for each page?

  3. Why should you set tags to "noindex" on most WordPress sites? What duplicate content issue does this solve?

Challenge: Take an existing blog post on your site. Analyze its current SEO using the content analysis feature. Write a 500-word improved version that scores "green" in Yoast or 90+ percent in Rank Math. Submit the improved version and compare rankings after 30 days.

FAQ

### Can I use both Yoast and Rank Math together?

No. They both try to output meta tags, sitemaps, and schema markup. The result is duplicate or conflicting HTML tags in your page head, which confuses search engines. Pick one plugin.

Do SEO plugins guarantee a #1 Google ranking?

No. SEO plugins give you the tools to optimize your site, but rankings depend on many factors: content quality, backlinks, competition, site speed, mobile usability, and user engagement signals. An SEO plugin is necessary but not sufficient for top rankings.

How often should I update my SEO settings?

Review your SEO settings quarterly. Check that your sitemap is still submitting correctly, your meta descriptions are up to date, and your schema markup matches your current content. When you add new features (e.g., a store or a blog), revisit your settings.

Do I need a separate plugin for schema if I have Yoast?

No. Yoast SEO includes schema markup. Rank Math also includes it. You don't need an additional schema plugin. The SEO plugin handles schema for all common types.

What is the best separator for titles?

The pipe symbol (|) is the most common and visually cleanest separator. It's used by Google itself in search results. The dash (-) is also acceptable. Avoid using characters like asterisks or underscores.

Mini Project

Optimize a complete 10-page WordPress site for SEO.

  1. Install either Yoast SEO or Rank Math.
  2. Run the setup wizard.
  3. Set custom meta titles and descriptions for every page.
  4. Configure XML sitemaps and submit to Google Search Console.
  5. Set schema type for each page (Article for blog, Organization/LocalBusiness for About page, FAQ for FAQ page).
  6. Write 3 blog posts optimized for different keywords, each scoring green in content analysis.
  7. Set up breadcrumbs in your theme.
  8. Configure social previews for Facebook and Twitter.
  9. Set up 301 redirects for any old URLs.
  10. Measure the impact: after 30 days, check Search Console for impressions and clicks.

What's Next

Now that your site is SEO-optimized, learn to capture leads with contact forms:

Continue to Lesson 29: Contact Forms — Create forms with Contact Form 7, WPForms, and Gravity Forms.

Related lessons:

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro