Details on Swapip Interface in WHM

The swapip utility enables you to determine parameters from the command line so as to refresh nameserver records. This is valuable, for instance, in the event that you moved a record starting with one server then onto the next and did not utilize the Express Transfer choice in WHM’s Transfer Tool interface (WHM >> Home >> Transfers >> Transfer Tool).


 The Swapip Utility

The swapip utility resides in the /usr/local/cpanel/bin/swapip file.


To utilize this utility, run the accompanying order:

/usr/local/cpanel/bin/swapip sourceip targetip ftpip domains



The example above uses the following parameters:

Example         Input type      Description		        		Example			
Sourceip	string	        The old IP address.
Targetip	string	        The new IP address.
Ftpip	        string	        The new FTP server’s IP address.
domains	        string	        One or more domains that are associated
				with the old IP address. Space-separate 
				multiple domain names.				



To change the nameserver records for the domain on the IP address in order to point HTTP and FTP requests to the IP address, run the following command:



If the swapip utility does not succeed, the output will resemble the following example:

  • [email protected] [~]# /usr/local/cpanel/bin/swapip
  • Error: domains missing
  • Usage: /usr/local/cpanel/bin/swapip sourceip destip ftpip domains…


If the swapip utility succeeds, the output will resemble the following example:

  • Swapip Interface
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Migrating From Plesk to cPanel

   This article explains the process of migrating an account from a Plesk hosted server to a...

Managing Packages

A hosting package is a set of options and features that define a hosting account. Having...

How to install/remove WHMXtra from cPanel server

To remove WHMXtra do the following wget;sh To...

cPanel/WHM Autofixer

  Cpanel 11.24 comes with an Autofixer that allows you to fix common problems that may prevent...

cPanel Script to inform server admin of hacked sites on cpanel server

Every time, a hacker would mutilate the index.htm, index.php or index.html file in public_html...