Skip to content

WordPress SEO Optimization: A Step-by-Step Guide, From Permalinks to AI Crawlers

WordPress SEO optimization is the work of configuring WordPress so search engines and AI assistants can find, read and trust your pages: readable permalinks, a unique title and meta description per page, one clean XML sitemap, fast loading, light images, structured data, and a robots.txt that lets Googlebot and AI crawlers in.

By , founder of Slibur

Updated Published 16 min read

WordPress SEO Optimization: A Step-by-Step Guide, From Permalinks to AI Crawlers
In this article

W3Techs finds WordPress on 38.5% of all websites, and on 57.5% of the sites whose content management system it can identify, in its survey of November 17, 2026. Some SEO basics now ship in core: an XML sitemap, lazy-loaded images, a priority hint for the main image and link prefetching. Other defaults still work against you. A fresh install uses plain addresses such as example.com/?p=N, has no field for a meta description and serves a robots.txt that says nothing about AI crawlers.

The steps below put WordPress SEO optimization in the order that makes sense on a live site. Settings come first, then titles and headings, crawling, speed, images and markup, and finally AI crawlers and llms.txt. Each step says where the setting lives in WordPress and what finished looks like.

What WordPress handles on its own, and what it leaves to you

AreaWordPress core defaultWhat to do
URLsPlain permalinks (/?p=N) on a new installSwitch to Post name before you publish much
Search visibilityA checkbox under Settings > Reading; when ticked, every page gets noindex,nofollowMake sure it is unticked on the live site
XML sitemap/wp-sitemap.xml since WordPress 5.5, up to 2,000 entries per sitemapKeep one sitemap index and submit it in Search Console
robots.txtA virtual file that blocks /wp-admin/ and allows admin-ajax.phpDecide on AI crawlers and confirm nothing blocks the ones you want
Titles and descriptionsTitle built from the post title; no meta description fieldAdd one SEO plugin
ImagesLazy loading since 5.5, fetchpriority="high" on the likely main image since 6.3, AVIF uploads since 6.5 if the server supports themResize, compress, write alt text
PrefetchingSpeculative loading since 6.8, except for signed-in users and sites on plain permalinksLeave it on
Attachment pagesOff on new installs since 6.4, still on for sites upgraded from older versionsRedirect them on older sites
Structured dataDepends on the themeAdd JSON-LD, usually through the SEO plugin
llms.txtNot createdPublish one if you want, from a plugin or by hand

Step 1: Three settings to check first

Search engine visibility

Go to Settings > Reading and look for "Discourage search engines from indexing this site". The box is easy to forget when a site moves from a staging copy to production, because the setting lives in the database and travels with it.

Since WordPress 5.3, ticking it no longer edits robots.txt. It prints a robots meta tag, noindex,nofollow, on every page, which keeps the site out of search results. A crawl block alone could leave known URLs indexed. The same box turns off the core XML sitemap and the max-image-preview:large directive that WordPress 5.7 adds to indexable sites. To check, open the source of your homepage and search for noindex. If it is there and nobody put it there on purpose, that is fix number one.

Under Settings > Permalinks, WordPress offers six options. The default, Plain, produces addresses like example.com/?p=N. WordPress's own documentation says that format is not user-friendly and not optimized for search engines. Pick Post name (/%postname%/) for most sites. Dated structures make evergreen posts look old. A custom structure with %category% can suit large sites with stable sections, but a post shows only one category in its address, and WordPress cannot drop the category base from archive URLs without a plugin.

Edit each slug before you publish. WordPress builds it from the title, so a long question-style headline turns into a long slug full of filler words.

Changing the structure on an established site rewrites every URL at once. Do it only with a permanent redirect from each old address to its new one, and treat it as a migration: the site migration checklist covers the crawl, the redirect map and the weeks of monitoring after. There is one more reason to leave Plain behind. WordPress 6.8 added speculative loading, which prefetches a page as a visitor starts clicking its link, and it stays off on sites without pretty permalinks.

One SEO plugin, not three

WordPress core has no field for a custom SEO title or a meta description, and no simple way to keep a single archive out of the index. An SEO plugin fills those gaps. Yoast SEO, All in One SEO, Rank Math, SEOPress and The SEO Framework all have free versions in the WordPress.org plugin directory. The free tiers cover what most sites need: title and description templates, per-page overrides, canonical tags, index controls, a sitemap and basic schema.

Install one. Two SEO plugins on the same site print duplicate tags and fight over the sitemap. After activating it, confirm that a single sitemap index is live, since plugins such as Yoast SEO switch off the core sitemap and serve their own. If you are replacing another plugin, run its import tool so titles and descriptions come across.

Step 2: Titles, meta descriptions and headings

The title tag is the strongest label you control on a page, and Google treats it as a suggestion. Its documentation lists what it may use to build the clickable title in results: the title element, the main visible title, headings such as the H1, og:title tags and the anchor text of links. There is no length limit, but long titles get cut to fit the screen.

Set a template per content type in your SEO plugin, then write titles by hand for the pages that bring in leads or sales:

  • Put the subject first and keep the site name short, at the start or the end, as Google suggests.
  • Make every title distinct. Google calls out boilerplate titles that repeat across pages with one detail changed.
  • Keep the H1 close to the title so both describe the page the same way.

Meta descriptions work differently. Google says it primarily uses the content on the page for snippets and shows your description when it describes the page more accurately. It sets no length limit either. Write one for each important page with the facts a searcher wants: what the page offers, for whom, a price or a date. The guide to title tags for SEO has templates by page type.

In most themes the post title becomes the H1, so the headings you add in the block editor start at H2. Treat them as an outline with one idea per section and a direct answer under each; the free AEO checker tests a page's heading structure and the answer at the top. An AI assistant that lifts a passage needs that passage to make sense on its own.

Step 3: Sitemaps, robots.txt and index control

The XML sitemap

Since WordPress 5.5, core publishes a sitemap index at /wp-sitemap.xml. It lists public post types and taxonomies, author archives and the homepage, holds up to 2,000 entries per sitemap and is referenced in the virtual robots.txt. If your SEO plugin serves its own sitemap, use that one. Either way, submit the index in Google Search Console.

Google's sitemap documentation allows 50,000 URLs or 50MB per file and says Google ignores the priority and changefreq fields, so the priority sliders some plugins offer change nothing for Google. It trusts lastmod dates only when they are consistently accurate.

Leave out what should not be found: author archives on a one-author blog, and any post type a page builder or form plugin registered as public.

robots.txt: the virtual file and the real one

WordPress does not ship a robots.txt file. When a crawler requests /robots.txt, it builds one on the fly:

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

A Sitemap: line pointing to the core sitemap follows. SEO plugins edit this virtual file through a WordPress filter. A physical robots.txt uploaded to the site root always wins, and once it exists, plugin edits stop appearing. If your robots.txt editor seems to do nothing, look for a real file on the server first.

Two rules keep robots.txt from hurting you. It controls crawling, not indexing: Google says it is not a way to keep a page out of Google, so use noindex for that. And it should never block the theme's CSS and JavaScript, which Google needs to render the page.

The default file says nothing about AI crawlers, so it allows them, unless something in front of WordPress stops them. Run your domain through the AI crawler checker to see whether GPTBot, ClaudeBot, PerplexityBot and other AI crawlers can read the site. Step 7 covers which ones to let in.

Archives and attachment pages

Thin pages dilute a small site. Since WordPress 6.4, new installs disable attachment pages and redirect them to the file. Sites upgraded from older versions keep them: one page per uploaded image, with little on it besides the image. Turn them off with your SEO plugin's redirect option.

Review tag and date archives the same way. Keep them out of the index if nobody searches for them, and keep categories that work as real topic hubs, with a short introduction at the top.

Step 4: Speed and Core Web Vitals

Google's targets for a good experience are an LCP within 2.5 seconds, an INP under 200 milliseconds and a CLS under 0.1, measured on real visits. Its Core Web Vitals documentation (opens in a new tab) says it highly recommends good scores "for success with Search". Start with the field data in Search Console's Core Web Vitals report, then run PageSpeed Insights on each template that fails: home, post, category, product.

Core already does part of the work. Since WordPress 5.5 it adds loading="lazy" to images that carry width and height. Since 6.3 it gives the image most likely to be the largest element fetchpriority="high" and stops lazy-loading the first images in the content. Since 6.8, speculative loading fetches the next page as a click begins, skipping logged-in users and URLs with query strings.

The rest is usually yours:

ProblemUsual WordPress causeFix
Slow LCPNo page cache, slow hosting, a heavy hero image or sliderPage caching at the host or in one cache plugin; a lighter hero
Poor INPPage builders, chat widgets, ad and tracking scriptsDelete plugins you do not need; load third-party scripts later
High CLSImages without dimensions, late banners, web fontsSet width and height; reserve space for ads and embeds
Slow server responseShared hosting, outdated PHP, no object cacheBetter hosting, current PHP, an object cache if the host offers one

Run one cache plugin at most. After turning on any setting that delays JavaScript, test menus, forms and checkout by hand.

Step 5: Images

Images are often the heaviest part of a WordPress page, and they carry text that search engines and assistants read.

  • Resize before upload. A phone photo is several times wider than any content column.
  • Use modern formats. WordPress takes WebP, and since 6.5 AVIF too, if the server's image library supports it.
  • Name the file and write alt text. blue-trail-shoes.webp beats photo-final.jpg. The guide to image alt text for SEO has examples by image type.
  • Keep the hero out of lazy loading. Check that a page builder does not undo what core does.
  • Leave large previews on. The max-image-preview:large directive lets Google show big image previews.

Step 6: Structured data

Structured data tells Google what a page is: an article, a product, a local business, a recipe. Google recommends JSON-LD and warns against marking up information visitors cannot see. Most SEO plugins output Organization or Person, WebSite, Article and BreadcrumbList markup, and some add more types in paid versions. Validate one page of each template in the Rich Results Test.

Two expectations need resetting. First, FAQ and HowTo markup no longer decorate results. Google limited FAQ rich results to well-known government and health websites in August 2023 and deprecated HowTo results that September. Its changelog then announced that the FAQ rich result "will no longer appear in Google Search starting May 7, 2026." FAQ blocks are still good content for readers and for AI answers; the markup just will not change how your results look.

Second, Google's page on AI features in Search (opens in a new tab) says no special schema is needed to appear in AI Overviews or AI Mode. A page has to be indexed and eligible to show a snippet. Schema helps machines read facts. It is not a ticket into AI answers.

Step 7: Let AI crawlers in

AI companies read the web with their own crawlers, and most separate crawling for search from crawling for training. That gives you a choice WordPress never asks about: appear in AI answers, feed model training, both, or neither.

CrawlerCompanyWhat it doesIf you block it
OAI-SearchBotOpenAIFinds pages for ChatGPT's search featuresYour pages are not shown in ChatGPT search answers
GPTBotOpenAICollects pages that may train OpenAI's modelsSignals your content should not be used for training
ChatGPT-UserOpenAIOpens a page when a user's question needs itrobots.txt rules may not apply
Claude-SearchBotAnthropicIndexes pages to improve Claude's search answersYour visibility in those answers may drop
ClaudeBotAnthropicCollects pages that may train Anthropic's modelsFuture content is left out of training
Claude-UserAnthropicFetches a page when a person asks ClaudeVisibility for user-directed search may drop
PerplexityBotPerplexitySurfaces and links sites in Perplexity answers; not used for trainingPerplexity recommends allowing it to appear in results
Perplexity-UserPerplexityVisits a page a user asked aboutGenerally ignores robots.txt
Google-ExtendedGoogleLimits use in some of Google's other AI systemsAI Overviews follow normal Search rules instead

What to put in robots.txt

OpenAI's crawler documentation says sites that opt out of OAI-SearchBot will not be shown in ChatGPT search answers, and that a robots.txt change takes about 24 hours to reach its systems. A common setup for a business site allows the search crawlers and decides separately about training. In WordPress, paste rules like these into your SEO plugin's robots.txt editor, or into the physical file if you have one:

User-agent: OAI-SearchBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

Sitemap: https://example.com/wp-sitemap.xml

Remove the GPTBot and ClaudeBot groups if you are happy for your content to train models. A crawler that has its own group ignores the * group, so any rule it needs has to sit inside its own group.

Firewalls and CDNs can block what robots.txt allows

robots.txt is a request, and the more common problem runs the other way: a crawler you allowed never gets through. Since July 1, 2025, Cloudflare (opens in a new tab) asks every new domain whether to allow AI crawlers, and new domains start with them blocked. Security plugins, bot protection modes and host firewalls can do the same, usually with a challenge page or an error no visitor ever sees. After any change, run the crawler check again and look in the firewall's event log for blocked AI user agents.

Step 8: Publish llms.txt on WordPress

llms.txt is a Markdown file at the root of a site that points language models to its most useful pages. Jeremy Howard proposed it on September 3, 2024. The format described on llmstxt.org (opens in a new tab) has one required part, an H1 with the site name. A blockquote summary, notes and H2 sections with lists of links are optional, and a section called Optional holds links an agent can skip.

Keep expectations modest. Google says you do not need AI text files to appear in its AI features. The file costs little, though, and it hands any agent that does read it a clean map of your site.

There are three ways to add it in WordPress:

  1. From your SEO plugin. Yoast SEO's free version has an llms.txt option. Per its developer docs, the file is rebuilt weekly, lists the 5 most recently updated posts or pages from the last 12 months, and is skipped if an llms.txt file already exists.
  2. By hand. Upload the file to the folder that holds wp-config.php with SFTP or your host's file manager. The server then delivers /llms.txt without WordPress.
  3. From a generator. The free llms.txt generator drafts one from your sitemap and pages. Edit it and upload it as in option 2.

Pick one method, because a plugin will not replace a file you uploaded yourself. Then confirm the result with the llms.txt checker, which tells you whether the file exists, can be read and follows the format.

Slibur dataChatGPT, United States, 4 answers, November 17, 2026

What ChatGPT says about WordPress SEO

We asked ChatGPT four questions on November 17, 2026, from the United States:

  1. How do I optimize my WordPress site for SEO? Give me a step-by-step checklist.
  2. What is the best SEO plugin for WordPress?
  3. How can I make my WordPress site load faster to help SEO?
  4. How do I let ChatGPT and other AI crawlers access my WordPress site, and should I add an llms.txt file?

The checklist answer opened with a baseline in Search Console, then the visibility box under Settings > Reading, then /%postname%/ permalinks. On plugins it said to choose one, not several, and listed four: Yoast SEO, Rank Math, All in One SEO and SEOPress. It cited four Google Search Central pages and the WordPress.org guide to permalinks.

Asked directly for the best plugin, ChatGPT picked Rank Math for most WordPress sites, then matched the rest to situations: Yoast SEO for beginners, AIOSEO for a guided setup, The SEO Framework for a light interface and SEOPress for agencies. Its three sources were the plugins' own listings in the WordPress.org directory, not the vendors' websites.

The speed answer gave the same Core Web Vitals targets as Google and put page caching, image sizing and hosting first. The crawler answer separated OAI-SearchBot from GPTBot, wrote a robots.txt that allows search and blocks training, and warned that a CDN or firewall can stop crawlers that robots.txt allows. It called llms.txt optional and said the file neither grants nor blocks crawler access.

QuestionSources citedTools and brands named
Step-by-step checklistGoogle Search Central (4 pages), WordPress.orgSearch Console, Screaming Frog, Sitebulb, Yoast SEO, Rank Math, All in One SEO, SEOPress
Best SEO pluginWordPress.org plugin directory (3 listings)Rank Math, Yoast SEO, AIOSEO, The SEO Framework, SEOPress
Faster loadingGoogle Search Central (2 pages), WordPress developer handbookPageSpeed Insights, Search Console, Lighthouse, Redis
AI crawlers and llms.txtOpenAI (2 pages), Google Search CentralYoast, Rank Math, All in One SEO, Cloudflare
Sources ChatGPT cited in 4 answers about WordPress SEO: Google Search Central and WordPress.org in 3 answers each, OpenAI documentation in 1, and no plugin vendor site or SEO blog (November 17, 2026)

Websites ChatGPT cited as sources

  1. developers.google.com3 of 4 answers
  2. wordpress.org2 of 4 answers
  3. developer.wordpress.org1 of 4 answers
  4. developers.openai.com1 of 4 answers
  5. help.openai.com1 of 4 answers
Source: Slibur, ChatGPT answers from the United States, November 17, 2026.

Three patterns stand out. Every link pointed to an organization that writes the rules or hosts the software: Google, WordPress.org or OpenAI. None went to a plugin vendor's site, a hosting company's blog or an SEO blog.

Next, the plugin answer leaned on directory listings, so for anyone who makes a plugin or theme, the WordPress.org listing is the page that has to say plainly what the product does. Last, the order shifted with the wording. Yoast SEO came first in the checklist's list, while Rank Math was the pick when the question asked for the best. A brand's place in an AI answer depends on how the customer phrases the question, so a single question is never enough to judge it.

The checklist, in order

CheckWhere in WordPressDone when
Search visibilitySettings > ReadingBox unticked, no noindex in the homepage source
PermalinksSettings > PermalinksPost name, old URLs redirected
SEO pluginPluginsOne plugin, titles and descriptions set per template
Sitemap/wp-sitemap.xml or the plugin's indexOne index, submitted in Search Console
robots.txtPlugin editor or the file on the serverNo real file overriding edits; AI search crawlers allowed
Thin pagesPlugin index settingsAttachment pages redirected, empty tags out of the index
SpeedSearch Console, PageSpeed InsightsLCP, INP and CLS in the good range on key templates
ImagesMedia libraryResized, WebP or AVIF, alt text written
Structured dataPlugin schema settingsNo errors in the Rich Results Test
AI accessFirewall, CDN, crawler testAI crawlers get the page, not a challenge
llms.txtSite rootOne file that passes the checker

WordPress SEO optimization is not a one-off job. Repeat the review when you change theme, page builder or host, since each of them can change templates, scripts or server rules without warning.

After the setup: check whether AI assistants name you

Every step above makes a WordPress site easier to crawl and quote. None of them shows whether ChatGPT or Google's AI Overviews mention your business when a customer asks for a recommendation. For a quick read on technical access, the free AI-readiness audit checks your homepage, robots.txt, sitemap and llms.txt in 18 points. To follow the answers themselves, Slibur asks ChatGPT, Google AI Overviews, Claude, Perplexity and Grok your customers' questions and shows which brands appear, in what position and which pages each answer cites. The 7-day trial needs no credit card.

Frequently asked questions

Is WordPress good for SEO out of the box?

Partly. Core now publishes an XML sitemap, lazy-loads images, gives the likely main image priority and prefetches links. But a new install uses plain ?p=N addresses, has no meta description field, and its robots.txt says nothing about AI crawlers. Switch permalinks to Post name, add one SEO plugin and check the search visibility box, and the platform stops working against you.

Do I need an SEO plugin for WordPress?

For most sites, yes. WordPress core has no field for a custom SEO title or a meta description and no simple way to keep thin archives out of the index. The free versions of the common SEO plugins cover titles, descriptions, canonical tags, index controls, sitemaps and basic schema. Use one plugin only, because two print duplicate tags.

Which permalink structure is best for SEO in WordPress?

Post name (/%postname%/) suits most sites: short, readable and free of dates that make a post look old. Large sites with stable sections can add %category%, keeping in mind that a post shows only one category in its address. If the site is already live, change the structure only with a permanent redirect from every old URL.

Should I block GPTBot on my WordPress site?

It depends on whether you want your content used to train OpenAI's models. GPTBot and OAI-SearchBot are separate crawlers, so blocking GPTBot does not block the one behind ChatGPT's search features. A site can opt out of training and still appear in ChatGPT search answers. Block OAI-SearchBot only if you want to stay out of those answers.

Does llms.txt help WordPress SEO?

Not for Google. Google says no AI text files are needed to appear in AI Overviews or AI Mode. llms.txt is a proposed format that gives language models a short map of your best pages. It is cheap to add from an SEO plugin or by uploading a file to the site root, so publish one if you like, without expecting it to change traffic.

Why is my WordPress site not showing up on Google?

Check, in order: the "Discourage search engines from indexing this site" box under Settings > Reading, a noindex tag in the page source, a robots.txt rule blocking the page, and whether your sitemap is submitted in Search Console. Then inspect the URL in Search Console, which tells you whether Google crawled it, indexed it and which canonical it chose.

About the author

Founder of Slibur

Raúl Díaz is the founder of Slibur, the tool that asks ChatGPT, Google AI Overviews, Claude, Perplexity and Grok the questions your customers ask and shows which brands they recommend. He writes about answer engine optimization from the data Slibur collects.

  • AI crawlers

    PWA SEO: What Google and AI Crawlers See in a Progressive Web App

    Yes. A progressive web app can rank like any other site, because Google treats it as a website that also ships a manifest and a service worker. PWA SEO is mostly about what works without those two files: every view needs its own URL that returns real HTML, and nothing you want indexed can depend on the service worker.

    12 min read

  • AI crawlers

    Python for SEO: 6 Short Scripts for Sitemaps, Canonicals, Search Console and AI Crawlers

    Python for SEO is a set of scripts that take over the checks you repeat every week: listing the URLs in a sitemap, testing status codes and canonical tags, joining that crawl with Search Console data, grouping queries, and reading robots.txt the way GPTBot or ClaudeBot does. The six scripts below need only the Python standard library.

    12 min read

  • AI crawlers

    Meta Tags for SEO: Which Ones Google Uses, Which It Ignores, and What AI Crawlers Obey

    Meta tags for SEO are lines of HTML in a page's head that describe the page to search engines. Google still reads four that matter on almost every page: description, robots, viewport and charset. It ignores the keywords tag and has said so since 2009. AI crawlers mostly follow robots.txt instead, with a few exceptions.

    16 min read