• Resolved claude192

    (@claude192)


    Hi,

    I’m trying to setup a script to copy (and without human involvment) a WordPress site from a “staging” area to the “live” area. They have different URL’s.

    My script uses the WP CLI to perform various “search & replace” operations and is working well. The live site functions as expected.

    However, I’ve noticed some “left over” references in <META> tags to the old URL, and I have traced these back to Yoast indexables. The following command resolves the problem:

    wp yoast index –reindex –skip-confirmation

    Am I creating new problems by doing this? I.e. do I lose anything with respect to the SEO context in search-engines on the live site if this is done regularly?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @claude192 ! The --reindex argument empties and rebuilds our indexables tables. So it is intended exactly for the use-case that you have. Important note; you should run it _after_ you’ve ran your search & replace, since it pulls data from your site, and if that still contains old references it’ll start using those. As it’s using live data, it should not be any different than before the copy of your site, and there should be no SEO complications.

    We’re currently working on preventing the indexables from building if the WordPress environment is set to anything other than production. So this should, in theory, prevent the need for using --reindex at all.

    Thread Starter claude192

    (@claude192)

    Thanks for confirming that. FYI, I have done it after all other steps as you suggest.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Does “wp yoast index –reindex” lose anything?’ is closed to new replies.