0

I have a WordPress Multi-site, sub-directory based like this:

https://www.example.com/

I have a site within the multisite

https://www.example.com/site-1/

that I want to rename to

https://www.example.com/site-2/

How would I do this? I'm assuming besides running a search and replace tool/plugin, I would need to update the URL of that site (i.e., https://www.example.com/site-1/) in the database somewhere?

1 Answer 1

1

If you go to your Network Admin -> Sites menu, you should be able to edit the site and change the site's Site Address (URL) to whatever you need it to be.

As for the search/replace: I recommend using WP-CLI's search-replace command to do this, if you've got it available.

wp search-replace https://example.com/site-1/ https://example.com/site-2 --url=https://example.com/site-1 --dry-run to see what will be replaced, and then run it again without the --dry-run argument to actually do the search/replace.

2
  • What if you want to move that same site (example.com/site-1) to a new domain (newdomain.com), but keep it in the multi-site environment?
    – user227044
    Oct 29, 2022 at 5:52
  • I'd guess that would just work? Does it not?
    – Rup
    Oct 29, 2022 at 14:10

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.