Yoast SEO is the standard for SEO optimization on WordPress. Once configured correctly, it automatically generates a sitemap, meta tags, and Schema markup.
Initial Setup (Setup Wizard)
- SEO → General → Run the configuration wizard
- Specify your site type: blog, business, shop
- Enter your organization name and logo
- Connect Google Search Console
- Specify the main keyphrase for the homepage
Setting Up the XML Sitemap
- SEO → General → Features → enable XML Sitemap
- The sitemap is available at:
yoursite.com/sitemap_index.xml - Add the sitemap to Google Search Console and Bing Webmaster Tools
Meta Tags for Each Page
In the editor for each page/post, the Yoast SEO block lets you set:
- SEO Title — title for Google (50–60 characters)
- Meta Description — description (150–160 characters)
- Focus keyphrase — the target keyphrase; Yoast analyzes the text
Open Graph (Social Media)
- SEO → Social → enable Facebook and Twitter/X
- Upload a default OG image (1200×630px)
Breadcrumbs (SEO + UX)
// In the theme's functions.php:
add_theme_support('yoast-seo-breadcrumbs');
// In the template:
<?php if (function_exists('yoast_breadcrumb')) {
yoast_breadcrumb('<nav class="breadcrumbs">', '</nav>');
} ?>
Common Yoast SEO errors
The plugin becomes noticeable exactly when something goes wrong: the sitemap will not open, or the search snippet looks different from what was set.
| Symptom | Cause | What to do |
|---|---|---|
| The sitemap returns 404 at /sitemap_index.xml | Permalink rules were not resaved after activating the plugin, or another SEO plugin conflicts on the same path | Go to Settings → Permalinks and click "Save Changes" |
| The meta description in Google search does not match what is set in Yoast | Google rewrites the snippet when it considers the description irrelevant to the query, or the page has not been reindexed yet | Check via Google Search Console → URL Inspection and request reindexing |
| There has been a critical error on this website after a Yoast update | Two SEO plugins are active at once and conflict over the same hooks | Keep only one SEO plugin active |
| Breadcrumbs do not show up on the front end | The theme does not call the yoast_breadcrumb() function automatically | Add the function call to the theme template manually |
If a WooCommerce store is losing sales because of slow product pages, see the article on setting up WooCommerce.
When Yoast SEO alone is not enough
- A multilingual site with hreflang markup — Yoast itself needs a separate multilingual plugin; it does not create language versions of pages
- A large online store with faceted filtering — the number of meta tags Yoast generates will not fix duplicate URLs from filter parameters; separate canonical rules are needed
- A technical SEO audit of crawling and broken links at scale — Yoast does not crawl the whole site; that needs a dedicated crawler
- Local SEO with several physical locations — each location needs its own LocalBusiness Schema markup, not the plugin's shared settings
- Sites with a very slow server response — Yoast's green indicator does not account for Core Web Vitals, and those increasingly affect search rankings
In these cases Yoast stays a useful base layer — meta tags, sitemap, basic Schema — but not the only tool in the SEO strategy.
For multilingual setup specifically, see the article on Polylang.
Advanced tuning through standard WordPress filters
Some fine-grained indexing control is not handled by Yoast itself but through the built-in WordPress core filter wp_robots, introduced in version 5.7:
add_filter('wp_robots', function ($robots) {
$robots['max-image-preview'] = 'large';
return $robots;
});
How to check that the SEO settings took effect
- View the page source: the meta name="description" tag should match what is set in Yoast
- Google Search Console → URL Inspection → Live Test shows the current version of the page
- The Rich Results Test confirms the Schema markup is correct with no errors
- The sitemap_index.xml file opens and contains an up-to-date URL list with no 404s or 500s
- The Coverage section in Google Search Console shows no increase in errors after the latest Yoast settings change
curl -s https://example.com/ | grep -i 'meta name="description"'
curl -s https://example.com/sitemap_index.xml | head -20