Learn the the steps to move your site from one server to another, copy a live site to your local machine, or copy a site you've developed locally to a production server.
We will cover:
Command line tips to make the site copy faster.
GUI alternatives for those who don't have ssh access or aren't comfortable with command line
Using drush to make it easier
Hosts files tricks to test the site on the new server.
Register to attend: https://www1.gotomeeting.com/register/568068625
Notes from session:
-
Get you account credentials in order. You are going to need several ssh, ftp, mysql passwords. Get them all in one place before hand where you can look them up
-
Copy files
possible methods
rsync
scp ftp - Can use GUI like Filezilla or Cyberduck
rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/ -
dump database
Tools:
drush: drush sql-dump > file.sql
mysql mysqldump -u username -p dbname > file.sql
phpmyadmin
backup and migrate module -
copy db to new server (see #2)
scp filename
or GUI -
Create db on new server
-
Load data for db dbump file and grant permissions
Tools
mysql -u username -p
CREATE DATABASE dbname;
mysql cli --> mysql -u username -p dbname < file.sql
DO NOT DO THIS IT WILL CLOBBER YOUR DATABASE IMPORT FILE! mysql -u username -p dbname > file.sql
phpmyadmin or cli
GRANT ALL PRIVILEGES ON dbname.* TO 'username'@'hostname' IDENTIFIED BY 'password';
-
Tell apache about the site and restart apache
ServerName geoffhankerson.com
ServerAlias gh1.themesfordrupal.com www.geoffhankerson.comDocumentRoot /var/www/sites/public_html <Directory /var/www/sites/public_html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/www.geoffhankerson-error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/www.geoffhankerson.com-access.log combined #PHP php_value error_reporting "E_ERROR" php_value error_log "/var/log/apache2/www.geoffhankerson.com-php.log"
-
Edit hosts file
-
Test
-
Switch DNS
10A. Fix problems
Comments
Drupal Dojo Session: Moving your site to a new server--Archived
This session is available on the Drupal Dojo:
http://drupaldojo.com/session/moving-your-site-new-server