Drupal: Testing multisite/domain-access Drupal locally and on a testing server
| drupalWe’re using Domain Access to manage a number of related subdomains on a single server. I prefer to develop and test locallly, then push my changes out to a testing server so that other people can try the system. I use the same domain names on my computer and on the test server so that I don’t have to make any changes in the database. To switch between them, I comment or uncomment a line like
127.0.0.1 example.com sub1.example.com sub2.example.com
in my /etc/hosts file.
However, Firefox caches the domain name information, and it can be confusing to figure out which server I’m on. The following setup makes this much easier:
- Install Domain Details to show the IP address of the server in your status bar. Good for a quick check – am I on 127.0.0.1 or elsewhere? (NOTE: I started with ShowIP, but it looks like ShowIP caches the information.)
- Install the Clear Cache Button extension.
- Restart your browser and customize your toolbar. Add the Clear Cache button. Click on this before switching sites.
In an ideal world, I’ll have a plugin that automatically twiddles my DNS entries, too. =)
You can comment with Disqus or you can e-mail me at sacha@sachachua.com.