How to change your web hosting safely

How to migrate a web hosting

If you have a website, at some point in your life you will have to change your hosting. It seems like an exaggerated statement, but it is something that sooner or later every webmaster faces. Either because you have had a bad experience with your hosting provider or because you have found a cheaper one or one that offers you the services and / or attention you need. But with time you end up changing.

It goes without saying that it is a delicate action that must be done carefully and in a synchronized way so that your readers never come across the web down or see strange things. In this article we are going to give you a series of tips in case you are facing a migration for the first time

Hire the new hosting

change-hosting

It is important to do it before your contract with the old one runs out. The best thing before you get down to work is see if your new hosting does the work for you and migrates your account. If so, you will only have to give your access data. SiteGround It is a good option since they always take care of migrations for free and with this you avoid any headache. Also now they are in promotion and they also offer you tfree domain transfer and compensation up to 6 months free of hosting for anticipated change of provider. In this way you will not have to wait for your current hosting to end, you can make the change to Siteground and they will give you up to 6 months free in case you have prepaid months pending to consume on your old hosting.

But if you have to work, then keep reading this article as we are going to give you all the keys to migrate your website without risk.

Make backup copies

Depending on your website, you will have to migrate only files or files and databases. This means pass all the information from one hosting to another. Nowadays it is very common to work with WordPress and I am going to give it an example. To migrate our blog in WordPress, we should download our files and a copy of the database with the FTP. There are different ways to get the copy from the database.

  • From cPanel or the control panel that we have
  • From the phpMyadmin
  • with a WordPress plugin

Restore backups on the new hosting

How to make and restore backups

We already have everything and we go to the control panel of our hosting. We upload the files via FTP, create the databases and restore the copies and finally we change the connection data to the database. In WordPress it is the wp-config.php, if it were a vBulletin forum it would be /includes/config.php and each CMS or script has its own file with the configuration data. What needs to be changed is the new database, the new username and password and if the ip is needed, although normally this is left as it is with 'localhost'.

To restore the backup I recommend that you use the same method that you used to generate it. If you have the same control panel, use it. If it was with phpMyadmin then restore it like this.

For medium or large databases these methods do not work well. The ideal is to use SSH if your hosting allows it, but this is beyond this tutorial. Is there any more accessible option a script like bigdump. You can leave a comment if you need more information.

Check that everything is going well and configure the new website

Here is an interesting tip. Many people, once they have the backups restored to the new host, change the DNS directly, without knowing if everything is fine or not and this is a risk because there may be errors and problems. Since the database was corrupt, some encoding problem that would leave us with strange characters or that we have not changed the config data well for the connection with the database among others.

So to avoid this, what we can do is fool our browser. If we edit the hosts file of our PC or laptop and add a line to it with the new IP and the domain, we will tell our browser that when it enters our address, go to that IP and not to the one that the domainer has.

With that we will enter and see how everything is before making the final DNS change.

DNS change

DNS changes are made from the domain registrar. What we do with this is to say that when someone enters our domain.com they do not go to our new address. These changes can take up to 48 hours to be seen (this phenomenon is known as DNS propagation) and during this period it is possible that there are people who already see the new hosting and others the old one.

If you have a forum or your blog has a lot of comments and what you want is that new ones are not created and lost, put the forum in maintenance and close comments until everything is ready.

These are the main tips when changing hosting, without analyzing the properties or requirements that a good hosting should have. If you have any questions do not hesitate to comment.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   bastify said

    Very good article