We use cookies to improve our services and provide a better experience. By continuing to use this site, you agree with our Cookies Policy.

More than 400 step-by-step articles to guide you through online project development.
HomeTutorialsCMS TutorialsDrupalDrupal Transfer

How to migrate a running Drupal website from a Linux server to my localhost

The process of a running Drupal website migration from a Linux server to the localhost requires several actions to be taken in order to do this correctly and as fast as possible. Generally, it requires to run a web server as well as MySQL with PHP support. Second part of the job is to download Drupal files and database that should be placed in localhost server.

Follow these steps on how to migrate a running Drupal website to localhost

In this tutorial we assume we already have all required things in localhost side. Therefore, we can start getting Drupal website files from the current hosting server. Probably the easiest way to get them by downloading through FTP. Simply power on FTP client like FileZilla and connect to the server by using FTP login details. Details can be obtained from hosting service provider.

Once connected, navigate to the directory of Drupal installation and select all the files related to the website. Then download all the selected files to the local drive. Those files should be placed in directory from which our local web server is opening website files. Such directory can be any created folder in our local drive which is defined in web server virtual host.

Next step is to get the database. For this reason we will need to connect to MySQL server by using phpMyAdmin. Simply open http://domain.com/phpmyadmin or click on phpMyAdmin link in the control panel and put database login details if needed.

In phpMyAdmin interface select database which is used for saving data for Drupal website. It should list all it’s tables.

Export Drupal database

Now we will need to export the entire Drupal database. To do this, click on “Export” tab in the top menu. There we may select export method and format which should be used to export the database. Basically, it should be enough quick export method with SQL format. By clicking “Go” button it should export database which should be saved in file “database_name.sql”.

After exporting the database, it needs to be imported in MySQL server which is running in the local server. To do this, connect to the local MySQL server by using phpMyAdmin. We should note, for importing the downloaded database we need to have database with the same name created in the local server. This can be easily done by clicking “Create database” in phpMyAdmin interface.

To import .sql file to the local database, click on the “Import” tab.

Import Drupal database

In this page we can select required .sql file from the local drive and import it by clicking “Go” button. Once the process will be completed, all tables will be added the local database.

If we have created database in the local MySQL server with another name, different username or password, we might need to update them in the file “/sites/default/settings.php”.

By following all the steps we should get Drupal website migrated from the Linux server to localhost environment. Moreover, we should be able to migrate website basically the same way from local server to the Linux one.

Rate this Tutorial:
No CommentsLeave a Comment

Other (195)

Popular Keywords