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.
- Download and Install Dev Desktop
- Important Step! Disable all caching and js/css aggregation on production site
- Clear cache on production site
- Download production site mysql database via PHPMyAdmin
- Compress and download all site files (codebase)
- Import local Drupal site via Dev Desktop using production site codebase and database (click on the + icon)
- Typically your site should launch via Dev Desktop, but there may need to be a few ‘tweaks’ as follows:
- 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
- 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.
- If the production site is forcing ‘www’ in the .htaccess file, you’ll need to comment this out (#)
- You may also need to comment out (#) the following line in the .htaccess file: AddHandler application/x-httpd-phpbeta .php
- 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 );