How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Procédure

Why migrate to Nginx?

Nginx, which we've been hearing a lot about recently, is a web server just like Apache. It is a great success with connoisseurs and is currently supported by a very active community. It is well maintained and, if properly managed, offers many advantages over Apache in terms of performance.

Before you can migrate your site, make sure you have the following information:

  • the name of the site database
  • the site database user name and password

How do you back up the web files for your Wordpress site on the ISPCONFIG Apache VPS?

To save the web files of your Wordpress site on the ISPCONFIG Apache VPS, you need to connect to your site using FTP. So to start with, you should make sure you have an ftp account that will allow you to back up your site.

If you need to change the FTP account settings for your site within the ISPCONFIG Apache VPS, follow the procedure below:

Log on to ISPCONFIG --> Sites --> FTP user --> FTP user name

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

You can also create a new ftp account under ISPCONFIG to perform the backup.

Once you have the ftp connection settings for your site, you can use your ftp client software to connect to the site inside the server. For example, with filezilla, you would need to open the application, and specify the connection parameters which are :

  • the server name or hostname in the form vpsxxxxx.serveur-vps.net or vpsxxxxx.lws-hosting.com
  • the ftp username for your site (this is the parameter that will allow you to connect to the appropriate site within vps)
  • the password of the ftp user
  • you can also specify the port, but this is not essential as it is the default port used on the server (port 21).

After that, you can click on the quick connect button and the connection to your site will be made. Information about the connection will be displayed on the Filezilla interface.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

You will be greeted by a certificate validation window that you should confirm.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Once the connection has been made, you will find the list of directories linked to your site in the interface dedicated to the file in the remote site (on the right). Your site's web files are located in the web directory. Double-click on the directory to enter it.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

You will then see a list of your web files on the remote site.

Then, in your local directory (on the left), navigate to a folder where you want to store your backup. Create a new folder if necessary.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Once your site backup folder has been created, you then need to select all the web files on the remote site.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Finally, right-click on the selected files and click "download" to download them to your computer in the open local directory.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Wait until the download is complete and you will have a backup of your site's web files.

How do I export your site's database?

To export your site's database, you need to connect to your VPS's phpmyadmin interface, following the procedures described in this article"How do I connect to the PHPMyAdmin utility from ISP Config?

You will probably need to know the name of your site's database, the database user name and the password before you can access it.

Then, once you are on the phpmyadmin interface, you need to :

  • click on the database in the left-hand menu, go to the "Export" tab at the top,

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

  • and finally, click on the "Export" button to download your exported database in sql format.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

How do I recreate the site and its database in the ISPCONFIG Nginx VPS?

To recreate the site and its database in the ISPCONFIG Nginx VPS, you now need to connect to the ISPCONFIG interface of this VPS.

1. Connecting to ISPCONFIG

Connecting to ISPCONFIG with the Nginx VPS is similar to any VPS with ISPCONFIG. You can follow the instructions in the article"How do I access ISPConfig on my dedicated VPS server?" to connect.

You will be greeted by theISPCONFIG authentication interface if you are not yet authenticated. Authenticate with the admin user and you will arrive at the home page.

2. Creating a new client

Once you have logged on to ISPCONFIG, you can add a new customer via the customer menu. Type in the information and save so that the customer can be created.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

3. Creating the site in the new Nginx VPS

After that, to recreate your site, you need to go to the "Sites" menu on the top menu, and then click on the green "Add a new site" button.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Enter your site parameters very carefully:

  • the site name must be exactly the same
  • the value of "auto-sub-domain" should also be the same
  • keep the same php version used to avoid incompatibilities unless you are sure that the php version you are going to use is compatible with your site
  • Don't activate the Let's Encrypt certificate yet, as it requires DNS pointing to be set up.
  • And register

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Once you have registered, the site will be created after a few minutes, and you will see a red light at the top, indicating the number of tasksISPCONFIG is running to apply the changes.

4. Creating the database in the ISPCONFIG Nginx VPS

The next step after creating the site is to create the database for your site.

Recreate your site's database by following the procedure mentioned in this article"How do I create a database in ISPConfig?"

Properly reproduce the information in your site's database:

  • the database user and password should be exactly the same
  • the name of your site's database should also be the same
  • reproduce the same settings as your old database

How do I import the site's web files into the ISPCONFIG Nginx VPS?

To enable you to upload the web files you have just saved via FTP, you will need to create an ftp user in your ISPCONFIG Nginx VPS server. Follow the instructions in this article"How do I create an FTP account in ISPConfig?" to create an ftp account for your site.

Once your ftp account is created, you can connect to the site in the other VPS, using your preferred ftp client software.

When you are connected :

  • open your site's backup folder on the local site
  • on the remote site, open the "web/" directory
  • Select all the locally backed up web files on your site
  • Right-click on the selected files and click on "Send" to upload the web files to the new server

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

How do I import the database for the new site into the ISPCONFIG Nginx VPS?

The database for your site can also be imported using the phpmyadmin utility on the ISPCONFIG Nginx VPS. As with exporting, you need to connect to phpmyadmin on the Nginx VPS.

Warning! The ports used for phpmyadmin on an ISPCONFIG Apache VPS and an ISPCONFIG Nginx VPS are different
.

On the Nginx VPS, you will need to access the phpmyadmin url with a browser. The url used to access it is in the form :

"https://vpsxxxxx.serveur-vps.net:8081/phpmyadmin orhttps://vpsxxxxx.lws-hosting.com:8081/phpmyadmin"(xxxxx being the vps number; vpsxxxxx.serveur-vps.net or vpsxxxxx.lws-hosting.com being the "hostname" or name of the VPS server)

This means that the port used for phpmyadmin is different from the port used for ISPCONFIG(8081 instead of 8080).

Once on the first authentication, type :

  • "root" as the user name
  • and enter the ISPCONFIG admin password in the password field
  • Confirm

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

This will take you to thephpmyadmin authentication page where you need to enter the access details of the database user you have created for the site.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Then, to import the database: select the database --> click on "Import" --> click on "Choose a file" .

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Choose the sql file of the exported database in your local directories, navigate down and click the "import" button to launch the import.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

The import time will depend on the performance of your internet connection and the size of your database.

How do I make adjustments to the site configuration so that it works properly?

On a configuration with Nginx, you should make adjustments to your site settings so that the basic redirects defined on Wordpress comply with the Nginx syntax.

Warning! It is not recommended to use .htaccess files on Nginx, which means that the redirection parameters and directives on your site's .htaccess file should be adjusted to its syntax and added via the Nginx directives on ISPCONFIG
.

To define redirects, you will need to add options in the site parameters on ISPCONFIG, following the procedure below:

  • Connect to ISPCONFIG on your Nginx VPS
  • Navigate to : Sites --> Site Name --> "Options" tab --> "nginx Directives
  • And add these lines :
location / { try_files $uri $uri/ /index.php?$args; }
  • Then save and the changes will apply after a few minutes.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

Once you have carried out all these procedures, all that remains is to point your domain to the ISPCONFIG Nginx VPS.

How do you point your site's DNS zone to the new VPS server?

The last part, DNS pointing, will depend on your DNS configuration. To point your DNS, you need to know where your domain's DNS zone is managed.

  • If it is managed via the other ISPCONFIG server with Apache, you have two options:

1. you can directly update the domain'stype A record in the ISPCONFIG Apache VPS

  • Log on to ISPCONFIG
  • Go to the DNS tab
  • Choose the DNS zone for your domain in the form "mydomain.tld".
  • Among the records, click on thetype A record for your site in the form "mydomain.tld."
  • Update the value of theip address by replacing theip address of your old server with that of the new one.
  • Save
  • Repeat the same procedure if your domain 's www record is also of type A

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

2. or recreate the DNS zone on the Nginx VPS and update the primary and secondary DNS servers following the instructions in this article "How do I create a DNS server in ISPConfig on a dedicated VPS server?".

  • If it's managed via another paneau, you'll need to connect to your domain's DNS zone management interface to change theip address.

Once the settings have been applied, all you need to do is wait for DNS to propagate and your site will be migrated to the new server.

How do you reinstate the Let's Encrypt certificate on your site?

After that, you can create a Let's Encrypt certificate on the site that has just been migrated by accessing the ISPCONFIG interface of the Nginx VPS, checking the "Let's Encrypt " option via the site parameter, and finally saving.

How to migrate a Wordpress site from an ISPCONFIG Apache VPS to Nginx

The Let's Encrypt certificate will be installed after a few minutes.

Conclusion

You are now ready to migrate your Wordpress site from an ISPCONFIG VPS with Apache to an ISPCONFIG VPS with Nginx. Don't hesitate to"trigger outsourcing" if you want to take advantage of our team's expertise to carry out the migration for you.

Rate this article :

5/5 | 2 opinion

This article was useful to you ?

Article utileYes

Article non utileNo

Vous souhaitez nous laisser un commentaire concernant cet article ?

Si cela concerne une erreur dans la documentation ou un manque d'informations, n'hésitez pas à nous en faire part depuis le formulaire.

Pour toute question non liée à cette documentation ou problème technique sur l'un de vos services, contactez le support commercial ou le support technique

MerciMerci ! N'hésitez pas à poser des questions sur nos documentations si vous souhaitez plus d'informations et nous aider à les améliorer.


Vous avez noté 0 étoile(s)

Similar articles

2mn reading

How do I add a website to an ISP Config VPS dedicated server?

1mn reading

How do I create a sub-domain on a dedicated VPS server?

1mn reading

ISPconfig - How do I link my domain name to my VPS server?

1mn reading

It's easy to configure my domains on my VPS


Ask the LWS team and its community a question