This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

📣 Join our live AMA on the Future of Page Builders with Brizy's CEO! Register Now →

How to Migrate Your Drupal 7 Website to a New Host

Updated on March 6, 2018

2 Min Read

How to Migrate Your Drupal 7 Website to a New Host

If your website is running slow and you have tried all the necessary steps to improve its speed but to no avail, then the only option left to you is hosting migration, but before that don’t forget to create a backup of Drupal 7 website.

Every web administrator knows that migrating to a better host can solve slow speed woes. But they are still reluctant because migration is arduous.

>However, there are ways in which you can migrate your website faster. In this tutorial, I will show you how to migrate your Drupal 7 website to a new and more powerful host by using simple steps.

The process involves the following steps:

Backup Website Folders

Backup the Database

Import the Website’s Backup

Import the Database Backup

Make Appropriate Changes in the settings.php File

Final Thoughts

Stop Wasting Time on Servers

Cloudways handle server management for you so you can focus on creating great apps and keeping your clients happy.

Backup Website Folders

First backup your entire website’s folder to avoid data loss. This is essential to ensure that the website remains operational and no data gets lost.

Connect to the present host server of your website through an FTP client such as Filezilla to take the backup. You will need to contact your hosting provider in order get the following details:

  • Server FTP host
  • Server FTP username
  • Server FTP password
  • Server FTP port number

Make a connection with the server…

Once the connection is established, you will see the files on the server. Your Drupal 7 website will be situated in the public_html folder. Locate it and copy the entire folder to the local machine.

Backup the Database

Now backup the website’s database. This is again a very crucial step since it deals with all the essential files and data of the website.

If you are using phpMyAdmin for database management, get help from your hosting provider in order to access it.

Navigate to the website’s database in phpMyAdmin and create a backup. Use the ‘export’ option to save the backup file on the local machine.

Export database

Once done, proceed to the next step.

Import the Website’s Backup

Visit www.cloudways.com and create a free account (if you haven’t created one already).

Start a new server.

add server

The platform takes a few minutes to launch a server. Navigate to the ‘Applications’ tab and select ‘Add Application.’

add application
Select Drupal 7 from the drop-down list. Now add a name for your app and create the application.

Now that the server and the application have launched, connect to them through an FTP client (I prefer Filezilla).

Go to Server Management >> Master Credentials to get server login information.

server master credentials

Once the connection is established, navigate to your application in the Applications folder, and then to the public_html.

Select and delete all the files in this folder.

delete files

Next, simply copy all the files from the backup created earlier and paste them into the public_html folder in the application’s folder.

Import the Database Backup

The next thing that you need to do is restore the database.

Remember the database that you exported earlier?

In this step, you will import it to the Cloudways server. But before that, delete all the tables already present in the new application’s database.

Delete the tables by navigating to your application’s main page on Cloudways. You will see a Launch Database Manager button.

launch database manager

Click the button and you will be brought to the built-in Cloudways database manager. Simply select all the tables here and click the Drop button at the bottom.

drop tables in database

After all the tables have been deleted, click the Import button at the right side and browse to the database backup saved on the local machine.

import database

Click the Execute button to import the database backup.

Make Appropriate Changes in the settings.php File

Now that the backups have been uploaded to the new server, it is time to make some changes to the settings.

An important change is in the login credentials of the database in the settings.php file. The present credentials must be replaced by the database credentials of the Cloudways database. This is very important because incorrect credentials will not allow access to the website.

This is a fairly easy procedure. First, navigate to Sites >> Defaults. Edit the settings.php file using your preferred code editor. Avoid text editors because they could mess up the formatting of the file.

Scroll down to the uncommented portion of the code where database credentials are mentioned. Simply copy the database credentials from the application’s main page on the Cloudways platform and paste them in the appropriate fields in the settings.php file.

database credentials in settings.php

Final Thoughts

That’s it. You have successfully migrated Drupal 7 website.

As you can see, migrating to another host isn’t as difficult as you thought.

Also, note that Cloudways provides one free migration for your website absolutely free of cost. This means that you don’t need to worry about migration-related problems since Cloudways will do all the work for you.

I hope you found this post useful. Do let me know if you have any further queries and I would be happy to answer them.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Hamza Zia

Hamza is a Drupal Community Manager at Cloudways - A Managed Drupal Hosting Platform. He loves to write about Drupal and related topics. During his free time, he can be seen obsessing over Football, Cars, Android and Gaming.

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now