Sun

How to transfer website to Hostens?

How to transfer website to Hostens?

1. Transfer files

1.1. Download website files

First of all you need to download website files from old server. In general website files are hosted in “public_html” (for DirectAdmin and cPanel). You could download files via FTP, e.g. with FileZilla software.

1.2. Upload website files

The second one is to upload your website files to Hostens. For uploading files you could use FileZilla or our web client (up to 256 MB). Website’s files should be uploaded into “domains/your_domain/public_html/folder.

2. Transfer database

2.1. Download database backup

For website database exporting you could use phpMyAdmin tool, which is provided by most hosting companies. How to download database backup via phpMyAdmin tool, could be found here. If your hosting provider does not offer phpMyAdmin, you may contact him for information, how you could download database backup (in general it is “.sql” file).

2.2. Upload database backup

In order to upload database backup to Hostens:

  •  create a database in DirectAdmin control panel;
  •  log in to phpMyAdmin tool: https://SERVER_NAME.hostens.cloud/MyAdmin/  (change ‘SERVER_NAME” to actual server name, e.g. “lime”);
  •  select created database from the right side menu;
  •  on top menu press button “Import”;
  •  under “File to Import:” section press “Browse” button and select database backup on your computer;
  •  click “Go” button to upload database backup.

3. Check website routes in database

In some cases (e.g. if you are using WordPress) it would be necessary to change website routes to pages and files in database. It is required due to after website transfer server’s user, which is often provided in routes, would be changed. In order to search for old server’s user and change it to the new:

  •  log in to phpMyAdmin tool;
  •  choose actual database and press button “Search” on top menu;
  •  into field “Words or values to search for” enter your old server username (between % symbols, e.g. %username%);
  •  in section “Inside tables” choose “Select All” and press “Go”;
  •  in search results you wiil see records wtih database tables and amount of found routes with old username;
  •  to see found routes press “Browse” near actual database table and to change route double click on it.

There is also another solution to change website routes in database. After downloading database backup (“.sql” file) by following step 2.1. you could open it with text editor (e.g. “Notepad”) and change records via “Find and Replace”. After it just follow step 2.2.

4. Update configuration file

If you are using some CMS (WordPress, Joomla, Drupal, etc.) for your website, it is most likely that after website transfer would be necessary to change configuration file. In this file are provided credentials for accessing database. You could easily change it in the most popular CMSs:

  • WordPress
    1. Configuration file is “wp-config.php“, it could be found in main website folder (“public_html” on Hostens);
    2. Change database name on the line define(‘DB_NAME’, ‘****’);
    3. Change database user on the line define(‘DB_USER’, ‘****’);
    4. Change database password on the line define(‘DB_PASSWORD’, ‘****’);
  • Joomla
    1. Configuration file is “configuration.php“, it could be found in main website folder (“public_html” on Hostens);
    2. Change database name on the line var $db = ‘****’;
    3. Change database user on the line var $user = ‘****’;
    4. Change database password on the line var $password = ‘****’;
  • Drupal
    1. Configuration file is “settings.php“, it could be found in folder “public_html/sites/default/“;
    2. Change database name on the line  ‘database’ => ‘****’,
    3. Change database user on the line  ‘username’ => ‘****’,
    4. Change database password on the line  ‘password’ => ‘****’,
  • Prestashop
    1. Configuration file is “settings.inc.php“, it could be found in folder “public_html/config/“;
    2. Change database name on the line define(‘_DB_NAME_’, ‘****’);
    3. Change database user on the line define(‘_DB_USER_’, ‘****’);
    4. Change database password on the line define(‘_DB_PASSWD_’, ‘****’);

     

  • Opencart
    1. Configuration file is “config.php“, it could be found in main website folder (“public_html” on Hostens);
    2. Change database name on the line define(‘DB_DATABASE’, ‘****’);
    3. Change database user on the line define(‘DB_USERNAME’, ‘****’);
    4. Change database password on the line define(‘DB_PASSWORD’, ‘****’);

5. Point a domain

Before pointing your domain to Hostens, check is transferred website working correctly. You are able to access your hosted on Hostens website by visiting address:

http://your-domain.server-name

For example: http://domain.tld.lime.hostens.cloud

If website is working correctly, you could point your domain. The most convenient solution is to change your domain name servers to Hostens, so you will be able to manage it throw our DNS Manager. Hostens name servers are:

  • ns1.hostens.com
  • ns2.hostens.com

To order our DNS Manager service (it is free), just open a new support request. After name servers would be changed to our (it takes up to 24 – 48 hours), all domain records will be sorted automatically.

Another solution is to point domain to Hostens server (e.g. “lime.hostens.cloud”) manually. This action should be done from your domain name servers provider’s system.

Was this article helpful?

Related Articles