Posted by trista13 on April 18, 2011 at 3:39pm
I have my production site just about ready to go (Yay!) but, I would like to have a test site for updating modules, etc. Ideally, I would have a completely separate site either hosted or locally to play with, but I have yet to get a local site working well and I don't have the budget to pay for two sites hosted. Bluehost said I could just make a folder called test and move a complete Drupal install there and then my test site would be domainname.com/test. I have some ideas about doing this, but if anyone has done this before, I would love some ideas on how to best accomplish this. Or, just generally, what works best for you when creating a test site?
Thanks!
Comments
I don't know about hosting,
I don't know about hosting, but I have a test site on my personal computer. Just install a vanilla working version of Drupal, then copy all the Drupal files and complete Drupal database from your production version to your PC. That's how I did it and it works well, I can test modules before installing live.
Several options
Hi Trista,
How you set up a test site depends what you want to use it for. If it's just for doing dry-runs of module and core upgrades, and fooling around, then doing a local site could be easy and a good option. An easy way to get started with local Drupal site is Acquia's free Dev Desktop which gives you an easy-to-install package that installs Apache, MySQL, PHP, and Drupal in a few clicks: http://network.acquia.com/downloads
If you need the test site to share with other people for any reason, having it just on one local machine can be a limitation, and you may want to look into hosting the test site online rather than local. I've never used Bluehost, but many shared hosting companies these days let you host multiple domains or subdomains at no extra charge, and then 'point' those domains at a different directory in your files area. So if your main site is 'mylibrary.org' you could create a subdomain 'test.mylibrary.org' and point that at a separate 'test' directory, which would have a separate install of drupal. Hosting providers often call this 'add-on domains', and you usually can set it up through the hosting control panel - here are some pages from Bluehost knowledgebase which may help: http://bit.ly/fuwEsF
You'll also need to create a second MySQL database for the test site, to keep the data separate from the live site. You usually do that from the control panel as well.
You could also use your free webenabled account for your test site.
Let me know if you need any help getting this going, these things can be a little tricky and the devil is in the details!
Don't you have to have a
Don't you have to have a stack that has Apache, PHP and MySQL to run a local host? I've had a site set up on my PC, but I always ran into database problems and/or white screen of death. Is there a way to just load the files into the computer and have the test site run without the XAMP stack?
XAMPP
Of course, you need a WAMP stack running on a Windows machine. XAMPP does the job and is very easy to install and configure. You then just import your database (with MySQL it's a matter of doing a full backup / restore) and copy drupal files into your Apache document root for Drupal.
Acquia Stack Installer
Trista,
Your reply might have just been drafted before you saw Andy's response, but the Acquia Stack Installed he was referring to does indeed install Apache, PHP, and MySQL.
-Scott
Scott Rouse
http://about.me/scott.rouse
test site
I use wampserver. You can install whatever version of the stack your site is being hosted by so you get the same results when testing when installing upgrades to your site before adding to the main sit. Hope that helps.
Thanks Andy! Having the
Thanks Andy! Having the vocabulary to ask Bluehost if they offer (and how much it costs) setting up a "subdomain" really helps! I think that would be the ideal situation because I tend to work on the test site at random times and mostly from home (but don't want to bog down my home computer with a Drupal stack). But, if that option does not work out, then the Acquia Desktop sounds good too.
I definitely learned about those tricky details last week with migrating my site!! Thankfully, I got it up and running with only a few minor tweaks needed (it only took my about ten tries). But, with each frustration comes knowledge.
Thanks for the clarification.
Thanks for the clarification. I don't know why I've seemed to have bad luck with the stacks running in Windows. (Probably user error!)
Or...
Or...a terrible lack of Mac in your life. ;-)
Scott Rouse
http://about.me/scott.rouse
mac
I hear macs are good. Is that true?
Apache Friends
I installed Apache Friends (http://www.apachefriends.org/en/xampp.html) XAMPP v. 1.7.1 and it worked on my first try. I think they are now at version 1.7.4. You might want to give it a try. Be aware that since it's a development platform, it's not optimized for security, so keep your PC firewall up!
I would just take their
I would just take their suggestion. That way you will have your test site on the same hardware as your production site.
Module config submit takes me back to main site
I've got as far as creating the test site and got it up and running at /test/, duplicated my DB and can connect to that, etc.
However, even though I've reset the $base_url in the test/sites/default/settings.php file, whenever I change a config setting, check/uncheck a module and click Save Configuration, I get sent back to the main site.
I've set $base_url to 'http://test.domain.org' which points to the /test folder; I tried setting it to 'http://www.domain.org/test', too, but neither seems to do the trick. On the Site Config admin page, the default homepage still has the main site hardcoded in it.
What am I missing?
Why do you need a $base_url
Why do you need a $base_url for your test site? Why don't you try it without it?
Still hangin out to dry
I've moved the site to a directory on the same level as public_html, emptied cache and sessions tables, set the settings.php file $base_url and unset it, and nothing seems to work. I'm still stuck with the old domain name as the default front page URL in the admin/settings/site-information. I've found several threads about this, and usually some combo of changing the settings.php settings, flushing the caches and emptying browser cookies seems to cure it for most people. I've tried all this to no avail. I can't make any changes on the test site, as I am taken to the main site every time I click Save configuration. It's very frustrating. Any ideas? Thanks if you do.
Okay, public_html... That's a
Okay, public_html... That's a hint. Sounds like you are hosting from a user directory.
Do you have control over apache configuration (httpd.conf or apache.conf), and are you able to set up virtual hosts?
If not, you have no way to tell the webserver where your site is. This means that the only way to run a second site is in a subdirectory, which is, as I recall, what you originally set out to do. In that case, you will need to set a base url that looks like:
$base_url = 'http://top.url/test'; // NO trailing slash!Thanks Cary! I appreciate the
Thanks Cary! I appreciate the steps to get this accomplished (and especially the last one, so simple, but I wouldn't have thought to do it that way!).
Thanks for the tip. I tried
Thanks for the tip (commenting out the $base_url). I tried it to no avail. But think I found my problem. I'm using a subdirectory of my site as the test site, rather than a peer directory. In other words I currently have the test directory on the same level as the prod site index.php and sites directory. I'm assuming that is probably the problem. (Just noticed that requirement in http://drupal.org/creating-drupal-test-sites)