{"id":14906,"date":"2025-05-19T15:18:51","date_gmt":"2025-05-19T09:48:51","guid":{"rendered":"https:\/\/www.skynats.com\/?p=14906"},"modified":"2025-05-19T15:18:53","modified_gmt":"2025-05-19T09:48:53","slug":"how-to-change-the-primary-ip-of-a-cpanel","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/","title":{"rendered":"How to change the primary IP of a cPanel"},"content":{"rendered":"\n<p>How to change the primary IP of a <a href=\"https:\/\/www.skynats.com\/cpanel-server-management\/\">cPanel server<\/a> is an important task that demands careful planning and execution. Whether you&#8217;re moving to a new server, adjusting your network configuration, or replacing an outdated IP, this guide will take you through the process to ensure a seamless transition with minimal disruption.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-step-1-update-primary-ip-in-whm\"><strong>Step 1<\/strong>: Update Primary IP in WHM<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log into WHM as the root user.<br><\/li>\n\n\n\n<li>Navigate to Home > Server Configuration > Basic WebHost Manager Setup.<br><\/li>\n\n\n\n<li>Locate the option: &#8220;The IP address (only one address) that will be used for setting up shared IP virtual hosts.&#8221;<br><\/li>\n\n\n\n<li>Change the primary IP address to the new one.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-step-2-modify-network-configuration-via-ssh\"><strong>Step 2<\/strong>: Modify Network Configuration via SSH<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in via SSH to your server as the root user.<br><\/li>\n\n\n\n<li>Edit the network interface configuration file:  <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/code><\/pre>\n\n\n\n<p>Change the IPADDR and GATEWAY values to match the new server IP address and gateway.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the GATEWAY value is missing in the ifcfg-eth0 file, add it in the main network configuration file:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/sysconfig\/network<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-step-3-update-ip-in-cpanel-configuration-files\"><strong>Step 3<\/strong>: Update IP in <a href=\"https:\/\/cpanel.net\/\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-secondary-color\">cPanel<\/mark><\/a> Configuration Files<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Modify the IPs file:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/ips<\/code><\/pre>\n\n\n\n<p>Remove the new primary IP if it is already present. Add the old primary IP in the format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>OLD_IP:NEW_IP<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Update the cPanel main IP file:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/var\/cpanel\/mainip<\/code><\/pre>\n\n\n\n<p>Replace the old primary IP with the new primary IP.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Modify the hosts file:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/hosts<\/code><\/pre>\n\n\n\n<p>Replace the old server IP address with the new one if necessary. Also ensure that the server hostname DNS records are also updated.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-step-4-restart-network-service\"><strong>Step 4<\/strong>: Restart Network Service<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Restart the network service to apply the new IP settings:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>service network restart<\/code><\/pre>\n\n\n\n<p><strong>Note:<\/strong> You may get disconnected and need to reconnect using the new IP address.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify the new IP setup:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ifconfig<\/code><\/pre>\n\n\n\n<p>This will list all available IP addresses and confirm that the new one is active.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-step-5-update-cpanel-license\"><strong>Step 5<\/strong>: Update cPanel License<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to the cPanel License Verification page.<br><\/li>\n\n\n\n<li>Enter your new primary IP address to verify the license status.<br><\/li>\n\n\n\n<li>If necessary, update your cPanel license to match the new IP address.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-step-6-final-verification\"><strong>Step 6<\/strong>: Final Verification<\/h3>\n\n\n\n<p>Log in to WHM using the new primary IP address and make sure that there are no cPanel license warnings or errors. If you&#8217;re running websites on your current main IP, all these websites will need to use the new IP after you change it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-conclusion\"><strong>Conclusion<\/strong><\/h3>\n\n\n\n<p>Changing the primary IP address in cPanel requires careful handling of network and configuration files. By following the steps outlined in this guide on how to change the primary IP of a cPanel, you can update the server IP with minimal downtime and avoid issues. Always ensure backups are taken before making any major changes.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to change the primary IP of a cPanel server is an important task that demands careful planning and execution. Whether you&#8217;re moving to a new server, adjusting your network configuration, or replacing an outdated IP, this guide will take you through the process to ensure a seamless transition with minimal disruption. Step 1: Update [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1020,1021,133,1023,1026,1025,1022,1024],"class_list":["post-14906","post","type-post","status-publish","format-standard","hentry","category-blog","tag-cpanel-ip-change","tag-cpanel-networking","tag-cpanel-server-management","tag-cpanel-tips","tag-cpanel-tutorial","tag-server-ip-configuration","tag-server-support-services","tag-web-hosting-management"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to change the primary IP of a cPanel server easily<\/title>\n<meta name=\"description\" content=\"Learn how to change the primary IP of a cPanel safely and efficiently. Step-by-step guide with expert tips\u2014get started now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to change the primary IP of a cPanel\" \/>\n<meta property=\"og:description\" content=\"Learn how to change the primary IP of a cPanel safely and efficiently. Step-by-step guide with expert tips\u2014get started now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"Server Management Services | Cloud Management | Skynats\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/skynats\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-19T09:48:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-19T09:48:53+00:00\" \/>\n<meta name=\"author\" content=\"Merin John\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:site\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Merin John\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/how-to-change-the-primary-ip-of-a-cpanel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/how-to-change-the-primary-ip-of-a-cpanel\\\/\"},\"author\":{\"name\":\"Merin John\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/b80e05405ba11197c3f60db56df40ded\"},\"headline\":\"How to change the primary IP of a cPanel\",\"datePublished\":\"2025-05-19T09:48:51+00:00\",\"dateModified\":\"2025-05-19T09:48:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/how-to-change-the-primary-ip-of-a-cpanel\\\/\"},\"wordCount\":428,\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"keywords\":[\"cPanel IP change\",\"cPanel networking\",\"cpanel server management\",\"cPanel tips\",\"cPanel tutorial\",\"server IP configuration\",\"server support services\",\"web hosting management\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/how-to-change-the-primary-ip-of-a-cpanel\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/how-to-change-the-primary-ip-of-a-cpanel\\\/\",\"name\":\"How to change the primary IP of a cPanel server easily\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\"},\"datePublished\":\"2025-05-19T09:48:51+00:00\",\"dateModified\":\"2025-05-19T09:48:53+00:00\",\"description\":\"Learn how to change the primary IP of a cPanel safely and efficiently. Step-by-step guide with expert tips\u2014get started now!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/how-to-change-the-primary-ip-of-a-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.skynats.com\\\/blog\\\/how-to-change-the-primary-ip-of-a-cpanel\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/how-to-change-the-primary-ip-of-a-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to change the primary IP of a cPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"name\":\"Server Management Services | Cloud Management | Skynats\",\"description\":\"Server Management and Cloud Management\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\",\"name\":\"Skynats Technologies\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"contentUrl\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"width\":989,\"height\":367,\"caption\":\"Skynats Technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/skynats\",\"https:\\\/\\\/x.com\\\/skynatstech\",\"https:\\\/\\\/www.instagram.com\\\/skynatstech\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/skynats-technologies\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCvTAjrFJ4_E2MJKwlDHomlg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/b80e05405ba11197c3f60db56df40ded\",\"name\":\"Merin John\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c6fda6ca622259bc47ba01df18b391ee9e0540db86283334dea33951c4fa19b8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c6fda6ca622259bc47ba01df18b391ee9e0540db86283334dea33951c4fa19b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c6fda6ca622259bc47ba01df18b391ee9e0540db86283334dea33951c4fa19b8?s=96&d=mm&r=g\",\"caption\":\"Merin John\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to change the primary IP of a cPanel server easily","description":"Learn how to change the primary IP of a cPanel safely and efficiently. Step-by-step guide with expert tips\u2014get started now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How to change the primary IP of a cPanel","og_description":"Learn how to change the primary IP of a cPanel safely and efficiently. Step-by-step guide with expert tips\u2014get started now!","og_url":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/","og_site_name":"Server Management Services | Cloud Management | Skynats","article_publisher":"https:\/\/www.facebook.com\/skynats","article_published_time":"2025-05-19T09:48:51+00:00","article_modified_time":"2025-05-19T09:48:53+00:00","author":"Merin John","twitter_card":"summary_large_image","twitter_creator":"@skynatstech","twitter_site":"@skynatstech","twitter_misc":{"Written by":"Merin John","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/#article","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/"},"author":{"name":"Merin John","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/b80e05405ba11197c3f60db56df40ded"},"headline":"How to change the primary IP of a cPanel","datePublished":"2025-05-19T09:48:51+00:00","dateModified":"2025-05-19T09:48:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/"},"wordCount":428,"publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"keywords":["cPanel IP change","cPanel networking","cpanel server management","cPanel tips","cPanel tutorial","server IP configuration","server support services","web hosting management"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/","url":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/","name":"How to change the primary IP of a cPanel server easily","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/#website"},"datePublished":"2025-05-19T09:48:51+00:00","dateModified":"2025-05-19T09:48:53+00:00","description":"Learn how to change the primary IP of a cPanel safely and efficiently. Step-by-step guide with expert tips\u2014get started now!","breadcrumb":{"@id":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.skynats.com\/blog\/how-to-change-the-primary-ip-of-a-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.skynats.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to change the primary IP of a cPanel"}]},{"@type":"WebSite","@id":"https:\/\/www.skynats.com\/blog\/#website","url":"https:\/\/www.skynats.com\/blog\/","name":"Server Management Services | Cloud Management | Skynats","description":"Server Management and Cloud Management","publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.skynats.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.skynats.com\/blog\/#organization","name":"Skynats Technologies","url":"https:\/\/www.skynats.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","contentUrl":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","width":989,"height":367,"caption":"Skynats Technologies"},"image":{"@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/skynats","https:\/\/x.com\/skynatstech","https:\/\/www.instagram.com\/skynatstech\/","https:\/\/www.linkedin.com\/company\/skynats-technologies","https:\/\/www.youtube.com\/channel\/UCvTAjrFJ4_E2MJKwlDHomlg"]},{"@type":"Person","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/b80e05405ba11197c3f60db56df40ded","name":"Merin John","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c6fda6ca622259bc47ba01df18b391ee9e0540db86283334dea33951c4fa19b8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c6fda6ca622259bc47ba01df18b391ee9e0540db86283334dea33951c4fa19b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c6fda6ca622259bc47ba01df18b391ee9e0540db86283334dea33951c4fa19b8?s=96&d=mm&r=g","caption":"Merin John"}}]}},"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/14906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=14906"}],"version-history":[{"count":3,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/14906\/revisions"}],"predecessor-version":[{"id":14910,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/14906\/revisions\/14910"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=14906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=14906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=14906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}