0

We have recently published our staging website. However, the header menu links on the new live website are still pointing to pages in the staging site.

How do I make links in the header menu on the staging site 'relative', so that when the staging site goes live, the menu links point to corresponding pages in the live website, rather than the staging website? What is the best practice to set up a menu or individual links in the menu in a staging site to avoid having this problem?

Thank you!

1
  • Have you checked for any 'custom' links in your menu items (on the Appearance, Menu page)? There shouldn't be any - all links should go to a 'page'. Commented Jul 9, 2023 at 17:50

1 Answer 1

0

If you can access WP CLI, you can use the search-replace command to search the database for the old URL and replace with the new URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.