Migrate Live (Production) Drupal Site to Dev Desktop

Here’s my step-by-step instructions to migrate a live (production) Drupal site to Dev Desktop.  This is useful for those instances when you may need to test updates/changes/etc on a local environment before applying them to your production site.

  1. Download and Install Dev Desktop
  2. Important Step! Disable all caching and js/css aggregation on production site
  3. Clear cache on production site
  4. Download production site mysql database via PHPMyAdmin
  5. Compress and download all site files (codebase)
  6. Import local Drupal site via Dev Desktop using production site codebase and database (click on the + icon)
  7. Typically your site should launch via Dev Desktop, but there may need to be a few ‘tweaks’ as follows:
  8. If the production site is using a reCaptcha module for the user login, you’ll need to disable this module to login into the site.  I like to use drush via the Dev Desktop by clicking on the black box to the right of the local code link.  When the console opens, enter: drush dis recaptcha
    It’s good to clear the cache again: drush cc all
  9. If the $cookie_domain has been defined in the settings.php file, you’ll need to comment that out (#).  You may need to comment out (#) other previously defined settings such as file_temporary_path and/or site_mail.
  10. If the production site is forcing ‘www’ in the .htaccess file, you’ll need to comment this out (#)
  11. You may also need to comment out (#) the following line in the .htaccess file: AddHandler application/x-httpd-phpbeta .php
  12. If the production site is using a ‘prefix’ for the database tables, you’ll need to add that ‘prefix’ to the loc_sitename_dd.inc file.  This file is located on your local machine: C:/Users/xxx/.acquia/DevDesktop/DrupalSettings.  The following would be added to the file above the ‘port’ => xxxxx line (the example below is using dr_ for the prefix. You’ll need to change this to your specific prefix):’prefix’ => ‘dr_’,
    ‘port’ => xxxxx );

Leave a Reply

Your email address will not be published. Required fields are marked *