Howdy all,

I am finishing up a drupal ecommerce site with ubercart modules, and before it goes live, I want to make sure that my backup procedure (ftp files and DB) is fully functional, and I don't want to try restore from a DB on my live site, I want to do it on the dev site. Does anyone have any suggestions on how to create a dev environment on 1and1 servers? I use phpmyadmin, and backup and migrate for DB backups, and to backup my modules, I just copy down my entire root folder from FTP.

I want my dev environment to be a completely separate installation from my live site. My current site is a multi-site install (sites/all) although I only am going to be running one site.

Thank you

Comments

vm’s picture

set up a new DB
import the prod DB into the dev DB
edit settings.php on the dev site to point to the dev DB

perhaps set up a multisite subdomain, dev.yoursite.com , though I wouldn't have a dev site online as it would be indexed by search engines and the like.

4ph3x2w1n’s picture

Hi VM,

Thank you for your reply.

When setting up a multi-site subdomain, all I would do is to make a new subdomain, and paste in my drupal files, which have most of my site's content in sites/all. So no actually changes to the files besides pointing my settings.php to look at a different DB, right?

How would I go about making it so that my dev site is not indexed by google? That is a good point I had not considered. Surely it would hurt my organic SEO strength if it was online... I also was under the impression that simply setting up a subdomain would not solve the conflicts between the live site and the dev site? For example: my live site is in "/", I made the directory "/test" and pasted in a copy of the site, but there is a conflict, any link on the dev site takes me to the live site. I was under the impression that a simple subdomain wouldn't exactly fix that?

Thanks again!

vm’s picture

correct the only file that requires editing is settings.php

I'd use a multisite so that you can utilize a single code base. stopping search bots and such, put the site in maintenance mode or set the permissions so that users can't view content. However, now your databases have different settings. Hence why it's best to develop on a local machine.

4ph3x2w1n’s picture

Well, my main purpose of doing this dev site for now is just to test that my backup procedure is working. I want to make sure the backup and migrate, and phpmyadmin are playing well together. So the fact that there are different codes doesn't really matter i guess. When I do updates and add new modules, I will be doing it to the live site. Just want to make sure that if anything happens, my backups work.

When you say that it is better to develop on a local machine.. How could I accomplish such a task?? Install PHP, apache, and the likes on my computer? Sounds like a real pain! I'm sure i'd learn quite a bit though :)

Thanks again

vm’s picture

installing a lamp stack on yoru localmachine isn't a pain at all , and it protects the live site because you can do your upgrades/updates/dev of modules/core on it which leaves your production site safe.

don't even need to move the files/folders or set up a subdomain, if you want to make sure a backup works, simply import the DB into a new Database. Note that only means THAT database backup works. Subsequent database backups will also need to be tested.

jamesoakley’s picture

All I do to stop the bots from indexing my dev sites is use .htaccess password protection on the dev site. Simply put the authentication directive in the parent directory to the dev copy of the site. (I can't remember if 1+1 use cPanel - if they do, you can easily set that up using cPanel's interface - "password protect directories")


This signature is currently blank