Home

Black Mountain

My Experiment on the Internet

Transferring your site

Transferring your site is a relatively straight forward proposition. In this case we shall focus on the command line tools. I tried importing a database using PhpMyAdmin but couldn't get it to work so for this we shall use the command line tool mysqldump. My first step was to Google for mysqldump. I came up with This link for MySQL 4.1 which looked relevant to my version.

Let's start with some assumptions. I run my sites on Windows so you will need to substitute as appropriate, frankly the differences are minimal for most of these tools. My Drupal site database name conventions are dru_site[ver] and the db account name is user_site. You will need to substitute your sitenames and user accounts for your setup.

So, from the docs page it looks like I need to run this command mysqldump -u user_site -p dru_site46. So, let's run that, you will be prompted for your password so enter that.

Wow. Lots of stuff just went by the screen didn't it? Hmmm... that's not useful now is it? We need to save this to a file don't we? So let's use the universal re-director sign > and try again.

mysqldump -u user_site -p dru_site46 > 03192006-dru_site46.sql I suggest getting into the habit of including dates in file names involving backups.

Note: I use PHP4 on my production site so my XAMMP site is using PHP4 as well, see XAMMP docs for how to switch PHP versions.

So let's copy all the files from your site (including the database backup) and all the files from your site to a subdir in xammp/htdocs/site_name. On your local systems edit your settings.php file to be "http://localhost/site_name". On you XAMMP install create a new database with the same name as your production site.

contents copyright Steven Peck - powered by drupal logo