In this article, we will look at 8 simple steps to transfer a website to another hosting. We've prepared this step-by-step guide to help you quickly and easily change hosting for your site. So let's take a look at the steps.
The first thing we need to do to transfer - is to add the domain name of the site in your account, and bind to it the appropriate folders, to which we, in the future, will move the files of your web resource. To do this, you need to find a section in the control panel, related to domain management, usually, it is called.
In this section, as a rule, there are two functions - register a new domain and transfer a domain. Select the transfer of the domain and specify a transferable address. This action does not yet connect the domain to the new hosting, it only prepares the account for future connection.
Transferring files is probably the easiest thing to do. Using an FTP client or a built-in file manager, you need to download all the files belonging to the site from the old hosting on your computer, and then, just the same, throw them on the new server in the folder public_html, which is responsible for the transferring domain.
Sometimes sites can have a lot of data and many files, so it is best to completely pack all the files into a ZIP archive on the old site, and then move the one archive file. Such an archive is easily unpacked on any hosting, and the transfer will take much less time, and the load on the servers will be reduced.
If your resource is very simple (made in plain HTML) and has no databases, then points 3 to 6 can be skipped. But any site that uses a content management system (CMS), requires a database MySQL, it also needs to be transferred.
To do this, in the admin panel of your old hosting find the section "Manage MySQL databases". Go to the admin panel phpMyAdmin. Choose the desired database and select the "Export" tab.
In the database export menu, select the ZIP or GZIP archive format for downloading. Click the "OK" button and specify the location on your computer where the file will be saved.
In the same way as in the previous point, you open the "Manage Databases" section (MySQL Databases) on another hosting site, only instead of choosing the database you want to create a new one.
It will need to specify a name, as well as username and password for access. Some hosts automatically set the username (login) corresponding to the name of the database, so they ask you to enter only the password. Write down these data, you will need them.
Press the create button, and you will have a new database. If you go inside this database, there won't be any tables there, as long as it is empty.
Once you have created a new database, you need to copy the information from the database you exported from the old server to it. To do this, select the menu "Import". Through the window you specify the path to the database saved on your computer and press import.
Once we've migrated the files and database, we need to link them together. To do this, find the configuration file of your CMS. In WordPress, it's called wp-config.php, and it's located in the root directory of the site (right in public_html).
If you are not bothered by malfunctions in the site, then you can skip this step, but if your resource is promoted, has search engine traffic and is regularly visited by a search robot, it is better to check everything before you disconnect the domain from the old hosting. Check the work of the site on the new hosting:
Some web hosts create a technical domain for each site. This is usually a level 3 domain, similar to news.google.com - at this address your pages work even if your main domain does not work. Check if everything works there, then move on to the next point.
If none of the previous options is available, you can contact the technical support of your new hoster and ask for help to check the work.
So, you are all set, files and database work fine on the new server. All that remains is to redirect the domain name to another hosting. To do this you need to change the DNS records of the domain. At the moment they have DNS records of the old hosting server, so all information is taken from them. We need to rewrite them.
Go to your account at the registrar of domain names, if you have registered a domain directly from the registrar. Find the section "DNS management" and make a request to replace them. You will need to find the new values either on the website of your new provider, or find them out through technical support.