Setup WordPress Multisite with xip.io or nip.io
- Create a new WordPress site using Laragon's Quick App. Let's say your new site's name is "mysite.test"
- Install WP CLI
- Open Laragon's Terminal and run
wp search-replace "mysite.test" "mysite.127.0.0.1.nip.io" --all-tables(or you could set it to
xip.io, I haven't seen any difference).
mysite.test.conf, and change server name line to
server_name mysite.127.0.0.1.nip.io *.mysite.127.0.0.1.nip.io;(or if you're using Apache, change the
- In Laragon, click "Stop All" and then "Start All". Visit mysite.127.0.0.1.nip.io. It should be your site.
- Enable WordPress multisite, choosing the "sub-domain" option.
Now you can create any subdomain you want on your site, without ever needing to touch your hosts file again. Enjoy!
@leokhoa yeah I saw that, and that got me started down this path, but I'm not sure what enabling xip.io or nip.io in Laragon actually does. The link "How to manage 'Wildcard DNS'" points to https://forum.laragon.org/topic/1014 which doesn't appear to have been created yet.
So it sounds like there's something I don't understand about xip.io/nip.io yet, because I thought I was using it in my example above!