Showing posts with label xxamp. Show all posts
Showing posts with label xxamp. Show all posts

Thursday, December 4, 2008

How to migrate Drupal to xampp for Development



Occasionally it is important to work on a local development machine. For this task I often use the xampp package, which mirrors a standard lamp stack.

To migrate an existing remote drupal site do the following:
  1. install xampp at c:\xampp
  2. modify c:\xampp\apache\conf\httpd.conf
    1. the line 'Listen 80' to 'Listen 88'
    2. If you had Clean URLs on your remote site (i.e. localhost/drupal/admin instead of localhost/drupal/?q=admin)
      1. #LoadModule rewrite_module modules/mod_rewrite.so' to ' LoadModule rewrite_module modules/mod_rewrite.so' (take out the #)
      1. AllowOverride None to AllowOverride All
    3. start apache and mysql from the xampp interface (you may need to change mysql configuration)
  3. copy over the following folders to a new 'drupal_remote_site' folder on your local machine
    1. Themes
    2. Modules
    3. Files
  4. if you don't already have the Backup and Migrate module on your remote machine, install it
  5. backup your database on the remote machine, copy this into the local folder 'drupal_remote_site'
  6. install the same version of drupal on your local machine which you had on your remote -- note: this downloads as a tarball which must be expanded and copied into within c:\xampp\htdocs\drupal (rename the copied folder as drupal from drupal-6.5 for instance)
  7. copy in your themes, modules, and files folder into this new drupal folder
  8. go to http://localhost:88/drupal/install.php, this will install necessary tables,etc. into the db
  9. now enable the Backup and Migrate module on the local machine
  10. use the 'Restore/Import DB' tab in drupal to import your db
  11. voila, all should be back to normal

Sunday, April 20, 2008

using xxamp for a lamp (linux,mysql, php) environment to do development on php? perhaps you are already running an iis server (or even the others through iis) ... in that case the default ports for webhost and mysql db will already be in use. to get apache to listen on other ports you will have to change the "listen" and "server" parameters in respective httpd.conf. For mysql .cnf the parameters are "port" at 20 and 27

you should do this at least for:
  1. http: in C:\xampp\apache\conf\httpd.conf
  2. ssl: in C:\xampp\apache\conf\extra\httpd-ssl.conf
  3. mysql: C:\xampp\mysql\bin\my.cnf
you may also want to change port values for mysql in:
  • C:\xampp\mysql\bin\mysqld-nt.exe
  • C:\xampp\apache\bin\php.ini (line 795)
add the following lines to administer your server with phpmyadmin (at line 20 in C:\xampp\phpMyAdmin\config.inc.php), with whatever your new port number is in the section noted below
  • $cfg['Servers'][$i]['host'] = 'localhost';
  • $cfg['Servers'][$i]['port'] = 'whatever your new port number is';