Had enough of your old hosting? Troubled by the low loading speed and poor performance of your site? Then it might be the high time to migrate Drupal site from one host to another to enhance the overall performance of the site. There is no denying that your Drupal site needs to respond fast and should be quick enough to attract the customers. However, a slow server will not satisfy the performance requirements of the Drupal sites. For this, you must understand the fact that a website is made up of three parts:
- CMS (Content Management System) like Drupal or WordPress.
- MySQL Database
- Some form of code pointing
If the current slow web hosting service on your site is hosted is not performing as per the desired needs, then you need to migrate Drupal site from one host to another. Some of the easy to achieve the same include:
Move Your CMS (Content Management System):
If you are migrating from the local server or WAMP to your own computer, then you would need to go to find your website on www and then zip up everything that is present in the folder. With the establishment of the self hosting service, you can make use of the “ssh” access along with psftp. If the hosting service will not allow you the same, then you can migrate. It is imperative to acknowledge the fact whether the next service provider is providing the free ‘ssh’ access before you move your site to their hosting platform.
Once the ssh access is established, you can do the following things:
- Obtain the address of your host. This will be in the format “servername.hostname.com”. You can note down the same once you have realized what it is in the real sense.
- The next step is to note down the username and the password of the ssh access. This could be different from the one you used to log in to your website or the host. These will also be different from the ones that one makes use of in the MySQL database.
- After this, you must get psftp and Putty on your machine. You can put them in a separate folder and then execute them there itself.
To make use of the psftp, you can click on it and provide the host address by giving the username and password as required. Once you have entered the system, you can then upload your file. Once the psftp is complete, you would need to unzip your file. Now the CMS (Content Management System) files are ready to be used. However, you would need proper database to execute the CMS files.
Migrate Across the Database:
The next step to migrate Drupal site from one host to another is to go the new hosting service and to set up the MySQL database to run the CMS files. To achieve the same, it is imperative to note down the username and the password. You can look out for the same in the instructions provided in the Drupal installation. You can find out the name of the host and note it down. Then you can visit your old hosting service and then make use of the PHPAdmin to export the required database out of the same. This involves three steps:
- Searching for the database
- Exporting the database
- Compressing the database
However, there are two major complications involved in this process. Initially, the users are provided a choice of format. The second complication is the procedure of the exporting that might lead to the creation of CREATE database command. This might trip the importing activity. There are basically two processes to export: one by selecting databases from the horizontal menu and the other by choosing the databases on the extreme left. Once you have the MySQL file, you can go back to the new hosting service. Then you would need to search for the PHPAdmin and then make the selection of the new database and then import the MySQL database.
Point the CMS to Your Database:
This is the last step to migrate Drupal site from one host to another. It involved the editing of the settings.php file that is available under the path sites/all/default. This can be considered to be a read-only file. Therefore, the first step involves giving access to oneself at the initial phase. After this you would need to scroll down until you observe the name of the database in the file. You can also look out for username, host name and the MySQL password that were used on the old host system. You would now need to change the name of the database, username, hostname and the MySQL password for the new hosting service.
In case you are working on your system, then you can make the changes before zipping up the content management files. You can go back later to reset the same for the local copy. In other case, if you wish to migrate Drupal site from one host to another, then you will have to make the changes in the setting.php files in a better manner.
Once you have understood the steps to migrate Drupal site from one host to another, you can also test your site in three effective steps:
- Transferring your CMS (Content Management System)
- Transferring your database from one host to another
- Fixing the settings.php file
Once you have completed all the steps, your Drupal site will be ready to be run on the new hosting service platform. If in case, you have not mentioned the domain name in the DNS, then you must do it now. It could be quite tricky to achieve the same for both the old site as well as for the new Drupal site. Therefore, it calls for meticulous attention to migrate Drupal site from one host to another.