Import a Drupal Website from a Server and run it locally on an Acquia Drupal AMP Stack
It is possible that you have created and edited a Drupal website on a server and now find that you want to work on this Drupal installation locally instead to speed up development time. To do this you need to import the Core Drupal website to your local Acquia Drupal AMP stack and make some local modifications. Here are the step by step instructions:
- FTP the entire Drupal folder from the server down to a local directory on your computer.
- Export the Drupal database from the server to your local computer.
- On the Acquia Dev Desktop Control Panel, select the ‘Localhost’ dropdown menu and choose ‘more’.
- Click the ‘Import’ button and fill in the details as in the following screenshot.
- Set the ‘site path’ folder to the location where the source code resides (see Step 1.)
- Select the ‘I have a MySql database dump file for my site’ radio button and give the database a new name.
- Choose a local server name to run your core Drupal installation from. Note that it is not possible to use ‘localhost’.
- After clicking the ‘Import’ button, the code and database are imported to the local Acquia Drupal AMP Stack.
- If you have multiple setting.php files (i.e. one under the ‘sites/default’ folder and one under the ‘sites/
’ folder), to aid troubleshooting you can remove one of these. In this case, I have removed the settings.php under the ‘sites/ ’ folder. - The Core Drupal settings.php file you have imported may be structured differently to the Acquia AMP settings.php. You can standardise it by making a couple of modifications:
- Remove the contents of $databases = array ();
- Remove the salt string also.
- Add the following code and note that when you try to run the website locally an error occurs:
- A closer investigation of the imported database reveals the problem. The database table prefix ‘dr_’ has been imported to the local database from the server and the Acquia Drupal AMP stack was not expecting this.
- To remedy the problem, add the table prefix ‘dr_’ to the settings.php. Once this has been added the imported website runs locally.
- The bottom of the settings.php should now look like the right hand side of the following snapshot:

Related Posts:
Hi! Good guide, but I still got problems, got a new error trying to click “go to” in Acquia web dev” now code in lock.inc can’t find tables. It looking for tables without the dl_ – prefix . It is sort of Catch 22. And it’s more than one inc file that complains. Strange!
Any remedy or hint?! Best/ Niklas