Yoast SEO 14.0: WP CLI index command

We have added a WP CLI command to Yoast SEO 14.0. In Yoast SEO 14.0 we created new tables in which we combine all the metadata for indexable objects on a site. Please see Omar’s post for the reasoning behind this. Regardless of whether you’re using Yoast SEO in the conventional way or through the new headless functionality, this works the best and the fastest if your site’s meta data is fully indexed. You can make sure of that by running our WP CLI command!

If you don’t know what WP CLI is, you’re missing out! It’s a command line interface for WordPress that makes loads of tasks easier. Read all about it on wp-cli.org.

If you’re using our REST API or our surfaces, running this CLI command on your site before going into production with those is very important.

Syntax

The syntax for this WP CLI command is very simple:

wp yoast index

The output will look something like this:

Indexing posts  100% [==============================] 0:00 / 0:00
Indexing terms  100% [==============================] 0:00 / 0:00
Indexing post type archives  100% [=================] 0:00 / 0:00
Indexing general objects  100% [====================] 0:00 / 0:00

If one of these doesn’t show that is because all of the items in there were already indexed. Authors are indexed as part of the posts indexation process. If you want to test this index command multiple times, please use the Yoast Test Helper. If you hit the “Reset Indexables tables & migrations” button in that plugin, it’ll delete the Indexables tables. After that you can run the process again.

Potential Yoast SEO WP CLI errors

You might get this error:

Error: 'index' is not a registered subcommand of 'yoast'. See 'wp help yoast' for available subcommands.

This means you’re not on the correct version of Yoast SEO. Please note that you need to be on Yoast SEO 14.0 or higher for the Yoast SEO WP CLI command index to work.

Questions? Let us know in the comments!

Webinar

Introduction to Yoast SEO webinar

17 March 2026

Discover how to effectively use the Yoast SEO plugin. Get hands-on tips for setup, content optimization, and more.

All Yoast SEO Webinars
Event

Baltic-Nordic SEO Summit

March 20 - 21, 2026

Team Yoast is Attending, Sponsoring, Yoast Booth at Baltic-Nordic SEO Summit! Click through to see who will be there, what we will do, and more!

See where you can find us next
Podcast

Podcast

26 March 2026

Add main headingMain heading optional second line Gain invaluable SEO insights and expert analysis One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim […]

All Yoast SEO Podcasts

Discussion (21)