Move site to another hosting

Changing hosting is a common procedure that accompanies the maintenance and development of an Internet resource. Not only an experienced webmaster can do the transfer of databases and configuration files. There are FTP-clients to copy data to the hosting server as a third-party program or embedded in the hosting control panel (ISP Manager). With their help, even a user who is not involved in the development process can independently place and launch the website on a new hosting site. You may find out how to move the website to another hosting using them in our article.

Reasons for transfer

There are always plenty of reasons to move to new hosting. The most frequent sources of motivation include:

  • The cost of leasing current hosting is too high;

  • Low data download speed;

  • Frequent server crashes (500 – Internal Server Error);

  • Lack of sane tech support;

  • Insecurity against viral attacks.

If the site was created on a local server, it needs more bandwidth and processing power to operate in the public domain. It is reasonable to move the site from the local server to hosting with a large resource for the speed of processing requests and the volume of data contained. These needs can meet the rental of a dedicated server.

Transferring a domain from hosting to hosting

It is important to keep the domain name of your site in terms of search engine optimization. Its loss is fraught with loss of position in search engine results. To keep your domain after changing hosting need to change the NS records through the control panel on the site registrar. Follow the instructions below:

  1. Log in to your account at the domain name registrar site.

  2. Select the desired domain, if you have more than one.

  3. Select "DNS Server Settings".

  4. Enter fresh NS records.

  5. In the hosting control panel, select "Add domain" and enter its name.

It usually takes 2 to 24 hours to update your DNS information, depending on your ISP's workload. We recommend that you do not make any changes to the site during this period, as they may be lost after registration.

How to correctly migrate a website from hosting to hosting

To preserve the functionality and information content of the resource at the new location is carried out-migration:

  • CSS files containing PHP and jаvascript scripts;

  • CMS templates and interpreter;

  • HTML documents and MySQL databases.

1. How to Transfer a Static HTML Site to Hosting

Site content in HTML can be copied to the root folder of the hosting directly through an FTP client. They do not require the transfer and configuration of SQL databases and CSS interpreters. It is obligatory to have an index HTML file in the data folder to run the page.

2. How to migrate a CMS website from hosting to hosting

Websites with CMS shell Joomla and WordPress are easily transferred to most hosting companies. The popular reg.ru registrar, for example, offers hosting services in which these designers are already integrated. Things are more complicated with the old means of development. Transfer site constructor on another hosting is not possible if it is developed on uCoz Weebly, Jimdo.

The transfer process consists of the following steps

1) Dump (backup) of database and CMS editor files is created.

2) They are uploaded to the new hosting.

3) Rewritten local links in the database using the full name of the site, corrected the NS records on the domain registrar site.

4) Edits are made to the configuration file.


[i]

In the example of a WordPress site, the transfer takes place in this order:

1) Creates a copy of the database through the PHPMyAdmin service. The resulting file in SQL format is saved to the working computer.

2) Work files are archived and transferred in compressed form to the root directory of the hosting via FTP connection. Then the files are unpacked through the hosting console.

3) In the control panel of hosting a clean MySQL database is created.

4) Performs import from the saved database into the new one through PHPMyAdmin while saving the encoding parameters.

5) Configuration file (wp-config.php in WordPress)

6) In your personal account on the domain management site editing NS-settings following those received from the hosting provider.

3. Transferring files from one hosting to another

To transfer engine files and media data we recommend using free FTP-client FileZilla. Proper site migration will require preliminary zip-archiving of files before sending them via FTP-client. This is done to avoid data loss in case of low connection speeds.

The sequence of operations is as follows:

1) In the new FTP connection dialogue box, enter its name.

2) Specify the server IP address, log in and password for login to hosting from your registration data.

3) Tap the "Connect" button.

4) Copy the archive with files to the root folder of the domain.

5) Extract files from the archive in the hosting control panel. In hosting with ssh support this function can be done via the command line.

4. Moving the database from one hosting to another

Moving a database from a host that is already in use takes several steps:

1) Open PHPMyAdmin in your hosting control panel.

2) Tick the required databases in the list and go to the "Export" tab. Check "SQL" and "qzip archiving" there and save the database in the archived forum.

3) Login to your new hosting account.

4) In the root folder of the configuration file config.php type in the new hosting dаta: server name, login and password for the database.

5) Open PHPMyAdmin and go to the "Structure" tab. There, mark and delete all other files and tables to avoid errors when copying the saved database.

6) Open the "Import" tab and transfer your database. Restore the original encoding if it was changed.

7) Set the permission to split the import process when approaching the limit.

8) Set the import format to SQL and the compatibility mode to ANSI.

9) Click "OK".

In the case of local servers, database files will be available in C:\WebServers\usr\local\mysqlN\data\ when using Denwer. When working with OpenServer they are located in C:\OpenServer\userdata\MySQL-x.x.xx. Database migration from Denver to hosting is also performed through PHPMyAdmin. For login in the address, line is written http://localhost/Tools/phpMyAdmin/ или http://127.0.0.1/Tools/phpMyAdmin/.

5. Correct the configuration files

Mandatory edits to the PHP configuration files should include specifying the following values:

  • of the database name;

  • database login and password;

  • the name of the server where it is stored

In the example of WordPress sites, the configuration file wp-config.php should be edited like this:

define('DB_NAME', 'Ваше название для БД');

define('DB_USER', 'Имя пользователя БД');

define('DB_PASSWORD', 'Пароль к БД');

define('DB_HOST', 'Имя хостинга').

6. Check access rights

The working panel of hosting provides for setting different access rights for users. Usually, they are marked by numerical codes and correspond to a certain set of manipulations with files: reading, writing, execution, etc. In the access settings, there can be set up several categories. Standardly there are 3 categories: owner, user group and others.

7. Check the operation of the site

It is highly desirable to check the performance of the site on the new hosting by a temporary link before attaching the domain. To do this, open the hosts file at C:{WINDOWS\system32\drivers\etc\hosts. It is entered through the gap IP address of the server, the domain name of your site and its variation with the prefix www. Now, when you enter the domain in your browser you will be redirected to the new hosting and you can evaluate the stability of the work.

Possible problems and troubleshooting

The most common problem is an error when navigating through internal sections of the site (windows open with error 404). It occurs because links in the database and configuration file are spelt incorrectly (by default they start with http://localhost). To fix it in the database text content http://localhost is replaced by the hosting domain name.

How to transfer website builder

The peculiarity of sites of constructors like Wix and Ucoz is that their domain and hosting are not separable. Only transferring from one hosting service to another is possible. Therefore, when choosing such platforms for creating websites, note that your options will be limited especially in terms of promotional tools. The designer may not support the installation of additional forms of feedback or subscription to e-mail newsletter.