WP-CLI commands

Updated

For developers and hosts who manage sites from the command line. All commands start with wp wpiseo.

CommandWhat it does
wp wpiseo infoVersion, database version and module states
wp wpiseo module-listList modules
wp wpiseo module-enable localTurn a module on (module-disable turns it off)
wp wpiseo variablesList template variables
wp wpiseo template "%title% %sep% %sitename%" --post=1Show what a template produces
wp wpiseo redirect-listList redirects
wp wpiseo redirect-add /old-page /new-pageAdd a redirect (--status=410, --regex)
wp wpiseo redirect-delete <id>Delete redirects
wp wpiseo redirect-import <file-or-plugin>Import redirects from a CSV file or another plugin
wp wpiseo redirect-exportPrint all redirects as CSV
wp wpiseo import yoastImport from yoast, rankmath, aioseo, seopress, tsf or slimseo (--overwrite, --skip-settings)
wp wpiseo sitemap-flushRebuild sitemaps on the next request
wp wpiseo indexnow <url>Submit URLs to IndexNow
wp wpiseo analyze 42Run the basic SEO checks on a post
wp wpiseo links-rebuildRebuild the internal link index
wp wpiseo gsc-syncSync Search Console data now

Run wp help wpiseo <command> for all options.

wp wpiseo redirect-add /old-page /new-page --status=301

Was this page helpful?