A
A
adisos2014-10-25 07:36:15
Domain Name System
adisos, 2014-10-25 07:36:15

Local and Stage versions of the site with the same domains, how to develop in parallel?

In general, I am developing a site on wordpress, everything is too tied to the domain. Therefore, on the local I change dns to 127.0.0.1 mydomain.com, and when I deploy the server to the stage, I again change the ip in /etc/hosts.
Well, or somehow deceive wordpress, maybe through a web server, such as when we go through the address local.mydomain.com, so that WP thinks that this is actually local.mydomain.com. Is that possible?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2014-10-25
@opium

Than change of a hosts does not suit you that? If you are tired of writing with pens, write a script in 30 seconds that will do this without pens.

D
Denis, 2014-10-25
@cjbars

I do this
on the production server, the domain is configured as usual example.com
on the local example.local
This is how I develop. And I am not attached to the domain at all. But this is me, for the general development :-)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question