Yes and No!
If both/all your WordPress installations are on localhost, they will work. But, if some of them are on localhost and some are on your live server, they may not work properly.
Websites or servers are identified by their IP, as localhost always has it’s IP as
127.0.0.1, your live server will not know where to send requests to.
See this list below to know either it’ll work or not-
- Localhost to localhost – works
- Localhost to live server/sites – works
- Live server/sites to localhost – doesn’t work