If you currently host your website locally or with another provider and want to transfer it to a new web hosting with us, there are a few things you need to do first.
Table of contents
3.1 How do I upload an SQL file via phpMyAdmin?
3.2 How do I upload an SQL file via SSH?
0. basic requirements
- Customer account -->How can I register with easyname?
- Active web hosting contract -->How can I order web hosting?
- Website incl. all required components, ideally packed into a .zip or .tar file.
- Web content (graphics, html, php, etc. files)
- Database (sql file), if applicable
- Domain
Once all these points have been prepared, you can proceed to transfer the website to your new web space.
This can now be done in two different ways.
- via (s)FTP upload
- via SSH connection
The following explains how this works in detail and what needs to be taken into account.
1. transfer via (s)FTP upload
For this option, you must first download the data to be transferred to your PC and then upload it to your new web space.
To upload to the web space, you need the access data, which you can obtain as described here. --> How do I manage FTP users?
The following article describes how the FTP upload works in detail. --> How can I upload files to my web space?
If you want to upload your data via a secure sFTP connection, you must use the SSH user instead of the normal FTP user. In CloudPit this is the same as the primary FTP user, whereas in the legacy control panel this is a separate user. --> Create article
Please note that with accounts in the legacy control panel the SSH port mentioned in the panel must be used for a fully functioning sFTP-connection.
2. transfer via SSH
explain, screenshots
$ rsync [OPTION] /path/to/website [SSH user name for easyname]@webserver:/path/to/website
3. database upload
This step is only necessary if a MySQL database is required to operate your website. This is particularly the case with ready-made CMS solutions such as WordPress, Joomla, typo3, but also with store systems such as Prestashop or Shopware.
If you want to transfer such a website to us, you will need the corresponding database from the previous provider. This database file usually comes as a .sql file, sometimes also in zipped form.
Please note that when importing into a MySQL database, only backups from another MySQL database are supported, but not backups from PostgreSQL or MongoDB, for example. You can find out which database types we support in web hosting here: --> Which databases are supported?
You can then upload the database itself in two ways:
- via upload in phpMyAdmin
- by
mysql
-command via SSH
For both variants, the database must already be created in advance. How this works is described in this article: --> How can I create a new database?
Both variants are briefly described below.
3.1 How do I upload an SQL file via phpMyAdmin?
First you have to log in to phpMyAdmin - for this you need the user name and password. If you no longer remember these, you can read or reset them as described here. --> Where can I find my MySQL credentials?
As soon as you are logged into phpMyAdmin, you can start the upload of the .sql file. Before doing so, however, you must select the database to which the .sql file is to be uploaded. If this is not done, the upload will fail.
Then click on the [Import] button in the top ribbon.
Select the desired file for upload in the import menu and click on the [Import] button at the bottom of this page.
If everything went well, you will see a number of tables on the left-hand side below the database once the database import is complete, see screenshot.
If an error occurs, copy it and contact us.
3.2 How do I upload an SQL file via SSH?
Alternatively, the .sql file can also be uploaded via SSH. This is particularly helpful if the file is larger, as HTTP uploads via phpMyAdmin can lead to connection interruptions or timeouts.
You can upload the .sql file to the web space in advance or transfer it to your new web hosting via SCP command. If your old web hosting is also based on Linux, the syntax is as follows:
scp /path/to/dump.sql benutzername@web#.wh20.easyname.systems:/ziel/verzeichnis/
If you want to transfer the file from a Windows host via SCP, the syntax is as follows
scp C:\path\to\dump.sql benutzername@web#.wh20.easyname.systems:/ziel/verzeichnis/
Depending on which database type is to be uploaded, the command must be extended slightly.
In the case of a MySQL 5.7 database, the input on SSH looks like this.
mysql -u username -p -h localhost database name < /path/to/dump.sql
username
and database
name must be adjusted according to the parameters in your hosting, as must the path to the .sql file. If you start the prompt in the directory in which the .sql file is stored, you can even omit the path.
If you want to import the database backup into a MySQL 8 database, you must add the port to the input:
mysql -u username -p -h localhost -P 3307 database name < /path/to/dump.sql