Migration of Wordpress with the Help of FileZilla and phpMyAdmin

Wordpress selon le RGPD
Vous n’avez pas encore d’hébergement Wordpress ou votre hébergement n’est pas situé en Europe ? Alors, consultez nos offres. Nous avons une solution pour toutes les exigences. Rapide, sûr, stable et conforme au RGPD.
Réserver un hébergement Wordpress maintenant

Introduction

This tutorial describes how to transfer an existing Wordpress installation using SFTP and phpMyAdmin to a hosting.fr web space. Alternatively, the tutorial “Migration of Wordpress by Backup & Restore with a Backup Plugin” is available, which is easier to implement for beginners.

This tutorial only covers the transfer of Wordpress. The transfer of your domain will be described elsewhere.

In this tutorial, we will proceed as follows:

  • Export the database data using phpMyAdmin at the previous host,
  • Import the database data using phpMyAdmin at hosting.fr,
  • Download the web space data using FileZilla via SFTP or FTP,
  • Modify the configuration file to adjust the database access data,
  • Upload the data to the new web space at hosting.fr.

Step 1: Check Prerequisites

  • You already have an existing Wordpress installation at a provider from which you want to migrate to hosting.fr.
  • The phpMyAdmin software is available at your current provider, and you know the MySQL / MariaDB database credentials used.
  • You know the FTP or SFTP access information of your previous provider. Normally, you can find this information after logging in to your provider’s client interface.
  • You have a web space and a database at hosting.fr that you can use for Wordpress.

Step 2: Migrate Database Contents with phpMyAdmin

To migrate the database contents, it is advisable to use the phpMyAdmin tool. phpMyAdmin is a web-based graphical interface for modifying the content of a MySQL / MariaDB database, but it also offers the possibility to export or import the entire database content.

Export the Database

The phpMyAdmin tool is already installed at most providers and is accessible, for example, via the client interface. Alternatively, it can also be installed manually.

Access phpMyAdmin.

Log in to phpMyAdmin:

Login in phpMyAdmin

After logging in, you will arrive at the following page:

Start page phpMyAdmin

If you have subscribed to a simple web hosting package, you will find only two links to databases on the left in the navigation. The “information_schema” database contains only metadata and does not interest us. Therefore, select the other database. You should now see the Wordpress tables as in the following screenshot:

Database view in phpMyAdmin

Click here on “Export”.

Database view in phpMyAdmin

Please select the “quick” option and the “SQL” format. Then click “OK”. Save the file offered for download on your computer.

Import the Database

Access phpMyAdmin. How to access the tool at hosting.fr is described in “Where can I find phpMyAdmin?”. How to find your access information at ###COMPANY-NAME### is described in the article “Where can I find my database access information?”.

Log in to phpMyAdmin at hosting.fr:

Login in phpMyAdmin

After logging in, you will also arrive here on the following page:

Start page phpMyAdmin

If you have subscribed to a simple web hosting package, you will find only two links to databases on the left in the navigation. The “information_schema” database contains only metadata and does not interest us. Therefore, choose the other database, which starts with the prefix “db”. You will arrive at the following display:

Database view in phpMyAdmin

Then select the “Import” option.

Import in phpMyAdmin

Click on “Browse…” and select the MySQL backup file from your computer. Then click “OK” to import the data. You should see the message “The import was successful.” appear. In the left column in phpMyAdmin, the imported tables for Wordpress will appear. The import of the database data into the new database is thus complete.

Completion of Import in phpMyAdmin

Configure Filezilla and Download Files from the Old Web Space

To transfer the files from the old provider to hosting.fr, first download them from there with the help of the FTP or SFTP client FileZilla using the access information you received from your previous provider. The FileZilla client can be downloaded from the FileZilla project website for Windows, OSX, or Linux. We recommend establishing the connection in FileZilla via the encrypted “SSH File Transfer Protocol” (SFTP). If this protocol is not available, FTP can also be used. In this case, however, the data will be transferred unencrypted over the Internet.

Create a Server Profile and Establish Connection to the Web Space in FileZilla

We will first create a server profile for your old provider:

  • Launch the FileZilla tool. Create a new server profile in the “Server Manager” under “File” > “Server Manager”.

Server Manager in FileZilla

  • Click on “New Server”.

  • Select the “SSH File Transfer Protocol(SFTP). If SFTP is not available at your previous provider, please select FTP.

  • Enter under “Server” the server address of your previous provider.

  • Select the port that was communicated to you by your provider. If you have not received a port, please choose port 22. If SFTP is not available at your previous provider and you had to choose FTP as the transfer method, choose port 21.

  • Enter the username and password for the web space.

  • For better visibility, you can name the server profile, for example, “old provider Wordpress”, by selecting the profile on the left in the tree and pressing “F2”.

Then create another server profile for the new web space hosting.fr. How to find your access information is described in the article “Where can I find my FTP/SFTP access information?”.

  • Click again on the “New Server” button.

  • Select the “SSH File Transfer Protocol” (SFTP).

  • Enter under “Server” the server address that you find in the management of “FTP/SSH User Statistics” of your hosting.fr hosting package.

  • Select port 2244.

  • Enter the username and password for the web space.

  • For better visibility, you can name the server profile, for example, “hosting.fr Wordpress”, by selecting the profile on the left in the tree and pressing “F2”.

Finally, click on “OK”.

  • FileZilla asks if you want to save the password for your web space. Select “Save Password”. However, we recommend saving the password securely by choosing a master password.

Download Files from the Old Provider

  • Relaunch the server manager. Select the profile of your previous provider and click on “Connect”. If you have set a master password for FileZilla, you may be asked for it.

  • FileZilla then asks if you trust the server’s cryptographic fingerprint. Select “Always trust this server, save this key.

Once the connection is established, navigate through the list of files and folders on the right until you find the files shown in the following screenshot, which corresponds to the root directory of Wordpress at your previous provider.

File Download FileZilla

  • Select all files on the right. Then right-click on the files and choose “Download”. The file download begins, and the progress for each file is displayed at the bottom of the screen.

  • Wait for the file download to complete. Then disconnect from the SFTP server:

File Download FileZilla

The files will only be uploaded to the new web space after modifying the configuration file of the Wordpress installation in the next step.

Modify Configuration Files for the New Database

Since the database access information, i.e., especially the username and password, at hosting.fr is different from those of your previous provider, they must be adjusted in the configuration files before uploading. To do this, open the wp-config.php file with a text editor. We recommend using the Visual Studio Code editor from Microsoft. It can be downloaded for free from Microsoft and is available for all common operating systems. Open the wp-config.php file with Visual Studio Code or another suitable text editor. In this file, you will find the following lines:

// ** MySQL settings ** //
/**   You will receive this access information from your host. **/

/**
 * Replace database_name_here 
 * with the name of the database you want to use.
 */
define( 'DB_NAME', 'myDatabaseName' );

/**
 * Replace username_here 
 * with your MySQL database username.
 */
define( 'DB_USER', 'myDatabaseUsername' );

/**
 * Replace password_here with your MySQL password.
 */
define( 'DB_PASSWORD', 'mySecretPassword' );

/**
 * Replace localhost with the MySQL server address.
 */
define( 'DB_HOST', 'my.database.server' );

Please enter the database name, username, and password for the database server, as well as the database server address in the file. How to find your access information at hosting.fr is described in the article “Where can I find my database access information?”.

Please add the following lines at the beginning of the file, before the line

// ** MySQL settings ** //
define('WP_SITEURL', 'https://mustermann-domain.com/');
define('WP_HOME', 'https://mustermann-domain.com/');

// ** MySQL settings ** //

Please replace https://mustermann-domain.com/ with the address to which you want to migrate your Wordpress installation. If you are also transferring your domain to the new provider, this step is not necessary.

Finally, save the file.

Upload Files to the New Web Space

After the configuration files for the database have been adjusted, the Wordpress installation files can be uploaded to the new web space. Please return to the server manager and connect to the SFTP server of hosting.fr.

The files must be uploaded to the correct folder on the server. Normally, this is the ./html/<domain name> directory relative to the directory you automatically access after connecting with FileZilla. However, this depends on the configuration of your web space for PHP and MySQL. How to configure the web space for PHP and MySQL is described in the article “How to configure my domain and web space for PHP and MySQL?”.

Select all downloaded files and folders and upload them to the server.

Conclusion of the Migration

Finally, access your Wordpress site in the web browser and check all functionalities.

The Wordpress administration panel can be reached by adding /wp-admin/ to your domain in the browser’s address bar, for example via https://mustermann-domain.com/wp-admin/.

If everything works as expected, the site migration is thus complete.

Don't hesitate to subscribe to our newsletter



Thank you for subscribing to the hosting.fr newsletter.
Wordpress Migration FileZilla phpMyAdmin