×


Plesk Change IP address – Follow this guide

Sometimes, Plesk users send us requests about changing the IP address on their servers.

Are you looking for steps in Plesk to change IP address? We can help you.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Plesk system queries.

In this context, we shall look into How to Change IP address in Plesk.


How to Change IP address in Plesk ?

Here, you will learn vian the below outlined steps to change IP addresses in Linux servers and Windows servers.


To IP address in Linux servers:

We must not add any Ip under Plesk > Tools & Settings > IP Addresses.

1. Firstly we have to connect to the server via SSH.

2. Then we have to generate a mapping file with current Plesk IP addresses using the following command:

# plesk bin reconfigurator /root/ip_map_file_name

3. After that we have to edit the file /root/ip_map_file_name.

For example:

To change the IP address 203.0.113.6 to 203.0.113.7:

venet0 203.0.113.6 255.255.255.255 -> venet0 203.0.113.7 255.255.255.255

4. Finally, to reconfigure Plesk and the services we can use the following command:

# plesk bin reconfigurator /root/ip_map_file_name


To change IP address in windows:

1. First, log in to Plesk.

2. And go Tools & Settings and take IP Addresses and remove the new IP.

3. Then connect to the server using RDP.

4. Now we will add the new IP address from Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings. From there right-click on a network interface > Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties > Advanced > Add.

5. After that we can go to Start > All Programs > Plesk Reconfigurator.

6. From there select Change server IP addresses.

7. In the section we can select IP addresses to be changed (i.e., select IP addresses that are to be replaced.)

8. Then we have to map each selected IP to a new IP address:8.1.

For mapping to an existing IP address, we can use the section Existing Address.

For mapping to a new IP address that will be created during mapping, we can use the section Create New IP Address.

9. Finally click Next.

Now the Plesk installation will be reconfigured to use the newly specified IP addresses in place of the old ones. All related records in the database will be updated, network adapter settings will be changed (the old IP addresses are removed), FTP and web servers will be reconfigured, and DNS records will be updated accordingly.

If the change fails during execution, all the changes must be rolled back.


Common error encountered while Changing IP address in Plesk

Sometimes while  changing IP address we may end up with the following error:

Plesk IP address cannot be removed:
Error: Cannot remove the IP address 203.0.113.6 because it is the primary IP address of a network interface.
ifmng failed: cannot delete main IP on interface

This happens because the Primary IP address of the network interface cannot be removed by design.

In order to resolve this error for servers with at least 2 IP addresses on them:

1. Firstly we need to connect to the Plesk server via SSH.

2. We must create a backup of the Plesk database before making any changes.

The following command can be used for this:

# plesk db dump psa > /root/psa_backup.sql

3. After that we can connect to the Plesk database using the following command:

# plesk db

4. Then we can modify the IP_Addresses table as given below:

In the following example:

203.0.113.6 – the current main (primary) IP address
203.0.113.7 – the new main (primary) IP address that is going to replace 203.0.113.6

We need to change the value of the main field  true for the new IP address:

mysql> UPDATE IP_Addresses SET main='true' WHERE ip_address='203.0.113.7';

After that, we can change the value of the main field to false for the old IP address:

mysql> UPDATE IP_Addresses SET main='false' WHERE ip_address='203.0.113.6';


[Need assistance in fixing Plesk errors ? We can help you. ]


Conclusion

This article covers the best method to Change IP addresses in Plesk. In fact, To change the IP address hosting a live site on your server, you'll first want to update your DNS information. In some cases, you will need to update your zone file with your new IP manually with the DNS host.