We’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.)

You could also manually edit your settings.php to override local settings. For instance, you could set the footer variable to echo the IP….

I always edit the settings.php to set the site name to ” BETA”

http://sachachua.com Sacha Chua

Oh, that’s even better. =) Thanks for the tip!

http:/malvese.com/ elv

I usually use a different favicon for local/test/live sites. I add a 2px red border for the local site, an orange one for the test site, and the regular favicon for the live site.

http://notreallypeople.com Devlon Duthie

Throw in some sym links for different sub-sites, or even different versions of modules and themes and local development is a dream.

http://jazzymarketing.com drupal rocks

hi, I would like help on how to best to do all development on remote server as I use multiple pcs and web access is not an issue.

say i have 3 sites I am working on, I would like to do all testing and design on one test domain and then move them to the appropriate domain when done.

mainsite.com/site1
mainsite.com/site2
mainsite.com/site3

then when the sites are ready to go live

site1.com
site2.com
site3.com

issues I run into are relative hyperlinks breaking due to site sturcture being different on test vs live.

Any ideas would be much appricated.

http://sachachua.com Sacha Chua

Always use url(..) for hyperlinks instead of hardcoding them directly.

Also, you can make your test environment more like your production environment by using domain names. For example, I like mapping qa.site1.com, qa.site2.com, and qa.site3.com to my test environment. Use Apache virtual hosts to make this happen.

Recent comments

JohnKitchin Thanks. That matches my current understanding too. It seems like use-package pretty conveniently installs and configures packages. I have seen cask for creating and installing... – Emacs configuration and use-package