Are you looking for a step-by-step guide on how you could migrate your Drupal website from one web host to the other? We have for you below a comprehensive guide that will help you execute the process smoothly. We have also included several screenshots so you have a clear understanding on how your screen should look while you are migrating your Drupal website.
Moving to a new web host isn’t something uncommon. There are various reasons to why one would require moving to a new web host, some of them include excessive downtimes, sluggish speed, high cost, poor customer support, etc. Several of our readers wanted to change their web host providers and wrote to us asking for steps along with explanations on how they could move their Drupal websites.
Before you can begin moving your Drupal website, there are some things that need to be taken care of.
- All Drupal core, modules and templates need to be update before the Drupal website is moved. Check for any pending updates and finish the updates before you proceed with the migration.
- Migration has its own drawbacks some of them include broken internal links, loss of website content, page ranking on search engines may go down and lengthy website downtime. Thus you must ensure that you have found a good Drupal host provider with whom you will spend a long time. Compare the web hosting providers and perform a thorough research to make sure you are moving to a trusted web host provider. Here we have some tips for you to choose a Reliable Drupal Hosting Service.
- When you are checking for the features and details of the services that you are subscribing to with your new host ensure that you check for the versions of PHP and MySQL they run on. Compare it with the version that you are currently running on. Along with this, check for any other incompatibilities with your new modules.
- Take a full backup of your website so you can restore it to its original state immediately as the migration is done.
Export Old Database
1. Perform a backup and download the entire home directory of your old website.
Open your FTP clients and to root, we have used Filezilla in the example. Locate home directory, download and save the complete directory to a local folder. Remember the place where you stored it and the name of the folder so you can locate it easily when you are uploading it. You can even write down the name and place of storage if you are forgetful.
2. Take a backup of MySQL database and download it on the old host.
Log in to the control panel of your server (Plesk usually), look for phpMyAdmin in the Database section.
Open phpMyAdmin and locate your Drupal website database such as “name_drupal”. Select all the check boxes or simply click on Check All to select all the checkboxes. Click on Export located on the top of the navigation bar.
While you are storing the file you need to pick the Export Method and Format. Select the Quick Export option and save file as SQL format.
Import to the New Database
Now that you have exported all your website files from your old website you can now easily import them to the new host. Follow the below steps to complete the process.
1. Remember the home directory folder that you saved, upload it to the new server. Open the FTP account using a client account and upload it to the new server.
2. You need to create a new MySQL database and a user with the same name before you can import the old database. Go to Plesk> Database and click Add Database. Enter a name for your database in the space where it says Database Name and then move to the the User section. You need to enter the username and password and verify the password once again. You can choose whether to allow user has access to all databases within the selected subscription or not. Then click on OK to generate a new username for you.
It is very simple if you want to add more users to the database. Find User Management at the upper right of Database page and click the button to start to add a new user. Create a new username and choose a specific database, click on OK to complete the process.
Finally, you also need to give permission to the user for making changes to the website. Click on the username you just created to give full access to the user to make any alterations on the website. Click on Apply to save your choice. Similarly you can create a user and pick on certain privileges only that you want to grant to a different user.
3. Import the database into the new host.
To import the database to the new host you need to login on the phpMyAdmin of the new host. Click on database that you created in the previous step and then click on Import located on the top of the navigation bar. Browse for the database backup that you created in the local computer and click on Go. Importing the database will take some time depending on the size of the file you are importing.
4. Modify the Database Settings
Modify and change the database settings at [Drupal-home] /sites/default/settings.php and change the location, database, username and password to match new database information.
/** The name of the database for Drupal */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
5. Change the DNS Settings
Modify the A record by logging in to the control panel of the domain registrar and point your domain name to the new IP address of your website.
6. Configure and Test the Site
The process of moving your Drupal website to the new host is complete. However, there are some configurations that you need to take care of. In order to configure the database properly you need to check the .htaccess file and settings.php file and move all the settings that were present in your old post. Along with this, you also need to add the new domain information.
Once this is over, you should login to your website to check whether it is up and running normally or just as it was on your old web host. You can quickly make some alternations in the content, check the reports, upload an image etc. to see if everything is working as it used to. If things are perfect then your website can run with the new hosting service provider without any hassles.
Once the migration is complete you should redirect all the old links to the new website so your visitors do not have a problem in reaching you.
After all of the above done you can move to the next stage and think about how to improve your site search ranking. Here we have some great Drupal SEO tips for you to improve the search rankings of your Drupal site easily.