{"id":5021,"date":"2025-02-24T12:05:18","date_gmt":"2025-02-24T17:05:18","guid":{"rendered":"https:\/\/underhost.com\/blog\/?p=5021"},"modified":"2026-07-12T13:19:42","modified_gmt":"2026-07-12T17:19:42","slug":"how-to-fix-cpanel-license-errors-after-ip-address-changes","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/how-to-fix-cpanel-license-errors-after-ip-address-changes\/","title":{"rendered":"How to Fix cPanel License Errors After IP Address Changes"},"content":{"rendered":"<section style=\"background: linear-gradient(135deg,#07111f 0%,#0f2040 55%,#061826 100%); border-radius: 22px; padding: 42px 34px; margin: 0 0 34px; color: #ffffff; box-shadow: 0 18px 45px rgba(0,0,0,0.28);\">\n<div style=\"max-width: 920px; margin: 0 auto;\">\n<p style=\"margin: 0 0 12px; color: #00d4ff; font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; font-weight: bold;\">cPanel License Troubleshooting<\/p>\n<h1 style=\"margin: 0 0 18px; font-size: 38px; line-height: 1.15; color: #ffffff;\">How to Fix cPanel License Errors After an IP Address Change<\/h1>\n<p style=\"margin: 0; color: #d7e6f7; font-size: 18px; line-height: 1.7;\">If your server IP recently changed and cPanel or WHM now shows an invalid license error, the license likely needs to be refreshed or reassigned to the new public IP address. This guide explains what causes the issue and how to fix it safely from SSH.<\/p>\n<\/div>\n<\/section>\n<section style=\"max-width: 920px; margin: 0 auto 34px;\">\n<div style=\"background: #ffffff; border: 1px solid #e6edf5; border-radius: 18px; padding: 28px; box-shadow: 0 10px 28px rgba(15,32,64,0.08);\">\n<h2 style=\"margin: 0 0 16px; color: #0f2040; font-size: 28px;\">Why Does cPanel Show a License Error After an IP Change?<\/h2>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 16px;\">cPanel licenses are tied to the server&#8217;s public IP address. When the server starts using a different main IP, cPanel may no longer match the license file on the server with the license record held by cPanel\/WebPros.<\/p>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 16px;\">This can happen after a VPS migration, dedicated server replacement, network change, IP renumbering, NAT or routing issue, or after assigning a new primary IP to the server.<\/p>\n<div style=\"background: #f8fbff; border-left: 4px solid #00d4ff; border-radius: 14px; padding: 18px 20px; margin: 22px 0;\">\n<p style=\"margin: 0 0 10px; color: #0f2040; font-weight: bold;\">Common cPanel license errors include:<\/p>\n<ul style=\"margin: 0; padding-left: 20px; color: #334155; line-height: 1.8;\">\n<li><strong>Invalid License File<\/strong><\/li>\n<li><strong>Cannot Read License File<\/strong><\/li>\n<li><strong>Your IP address has changed, and your license is invalid<\/strong><\/li>\n<li><strong>The cPanel license server said that a license could not be issued for your server<\/strong><\/li>\n<\/ul>\n<\/div>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0;\">In most cases, the fix is simple: confirm the server&#8217;s public IP, refresh the cPanel license file, and verify that the license is active for the correct IP.<\/p>\n<\/div>\n<\/section>\n<section style=\"max-width: 920px; margin: 0 auto 34px;\">\n<div style=\"background: #ffffff; border: 1px solid #e6edf5; border-radius: 18px; padding: 28px; box-shadow: 0 10px 28px rgba(15,32,64,0.08);\">\n<h2 style=\"margin: 0 0 18px; color: #0f2040; font-size: 28px;\">Before You Start<\/h2>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 16px;\">You will need root SSH access to the server. If this is an UnderHost managed server, our team can check and correct the license for you through a support ticket.<\/p>\n<div style=\"display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; margin-top: 20px;\">\n<div style=\"background: #f8fbff; border: 1px solid #dbeafe; border-radius: 16px; padding: 18px;\">\n<h3 style=\"margin: 0 0 8px; color: #0f2040; font-size: 18px;\">Access Needed<\/h3>\n<p style=\"margin: 0; color: #475569; line-height: 1.7;\">Root SSH access or WHM terminal access.<\/p>\n<\/div>\n<div style=\"background: #f8fbff; border: 1px solid #dbeafe; border-radius: 16px; padding: 18px;\">\n<h3 style=\"margin: 0 0 8px; color: #0f2040; font-size: 18px;\">Main Requirement<\/h3>\n<p style=\"margin: 0; color: #475569; line-height: 1.7;\">The license must match the server&#8217;s public IP.<\/p>\n<\/div>\n<div style=\"background: #f8fbff; border: 1px solid #dbeafe; border-radius: 16px; padding: 18px;\">\n<h3 style=\"margin: 0 0 8px; color: #0f2040; font-size: 18px;\">Support Path<\/h3>\n<p style=\"margin: 0; color: #475569; line-height: 1.7;\">If the license was purchased through UnderHost, open a ticket and we can correct it.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<section style=\"max-width: 920px; margin: 0 auto 34px;\">\n<div style=\"background: #ffffff; border: 1px solid #e6edf5; border-radius: 18px; padding: 28px; box-shadow: 0 10px 28px rgba(15,32,64,0.08);\">\n<h2 style=\"margin: 0 0 22px; color: #0f2040; font-size: 28px;\">Step-by-Step Guide to Fix cPanel License Errors<\/h2>\n<h3 style=\"margin: 24px 0 12px; color: #0f2040; font-size: 22px;\">Step 1: Verify Your Server&#8217;s Current Public IP Address<\/h3>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 14px;\">First, confirm which public IP cPanel sees from your server. Run:<\/p>\n<pre style=\"background: #07111f; color: #d7e6f7; border-radius: 14px; padding: 18px; overflow: auto; font-size: 14px; line-height: 1.6;\"><code>curl -s http:\/\/checkip.cpanel.net<\/code><\/pre>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 16px 0 14px;\">You can also check the IPs configured locally on the server:<\/p>\n<pre style=\"background: #07111f; color: #d7e6f7; border-radius: 14px; padding: 18px; overflow: auto; font-size: 14px; line-height: 1.6;\"><code>hostname -I<\/code><\/pre>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 16px 0 0;\">The public IP returned by <code>checkip.cpanel.net<\/code> is the most important value for licensing. If that IP is not the one assigned to your cPanel license, the license refresh may fail.<\/p>\n<h3 style=\"margin: 30px 0 12px; color: #0f2040; font-size: 22px;\">Step 2: Refresh the cPanel License File<\/h3>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 14px;\">Run the cPanel license update command:<\/p>\n<pre style=\"background: #07111f; color: #d7e6f7; border-radius: 14px; padding: 18px; overflow: auto; font-size: 14px; line-height: 1.6;\"><code>\/usr\/local\/cpanel\/cpkeyclt<\/code><\/pre>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 16px 0 0;\">This forces cPanel to contact the license servers and refresh the local license file. If the license exists for the server&#8217;s current public IP, this is usually enough to fix the problem.<\/p>\n<h3 style=\"margin: 30px 0 12px; color: #0f2040; font-size: 22px;\">Step 3: Check the License Status<\/h3>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 14px;\">You can verify whether the license is active for the server IP by checking cPanel&#8217;s public license verification endpoint:<\/p>\n<pre style=\"background: #07111f; color: #d7e6f7; border-radius: 14px; padding: 18px; overflow: auto; font-size: 14px; line-height: 1.6;\"><code>curl -s https:\/\/verify.cpanel.net | grep $(curl -s http:\/\/checkip.cpanel.net)<\/code><\/pre>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 16px 0 0;\">If the command returns your IP and active license information, the license is valid. If it returns nothing or the license still shows invalid, continue with the next step.<\/p>\n<h3 style=\"margin: 30px 0 12px; color: #0f2040; font-size: 22px;\">Step 4: Update the License IP If Needed<\/h3>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 16px;\">If the license is still assigned to the old IP address, it must be updated to the new public IP.<\/p>\n<ol style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 16px; padding-left: 22px;\">\n<li>If your cPanel license was purchased through UnderHost, open a support ticket from <a style=\"color: #0f8fb3; font-weight: bold;\" href=\"https:\/\/customerpanel.ca\/client\" target=\"_blank\" rel=\"noopener\">CustomerPanel<\/a> and include the server IP.<\/li>\n<li>If you purchased the license directly from cPanel, log in to the <a style=\"color: #0f8fb3; font-weight: bold;\" href=\"https:\/\/store.cpanel.net\" target=\"_blank\" rel=\"noopener\">cPanel Store<\/a>.<\/li>\n<li>Go to your licenses or orders section.<\/li>\n<li>Select the affected license and update the assigned IP address.<\/li>\n<li>Return to SSH and run <code>\/usr\/local\/cpanel\/cpkeyclt<\/code> again.<\/li>\n<\/ol>\n<div style=\"background: #fff7ed; border: 1px solid #fed7aa; border-radius: 16px; padding: 18px 20px; margin: 22px 0;\">\n<p style=\"margin: 0; color: #7c2d12; line-height: 1.7;\"><strong>Important:<\/strong> Do not keep changing the server&#8217;s main IP repeatedly while troubleshooting. Confirm the correct public IP first, then update the license once.<\/p>\n<\/div>\n<h3 style=\"margin: 30px 0 12px; color: #0f2040; font-size: 22px;\">Step 5: Restart cPanel Services<\/h3>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 14px;\">After the license refresh completes successfully, restart cPanel services:<\/p>\n<pre style=\"background: #07111f; color: #d7e6f7; border-radius: 14px; padding: 18px; overflow: auto; font-size: 14px; line-height: 1.6;\"><code>service cpanel restart<\/code><\/pre>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 16px 0 14px;\">Or restart only the cPanel web service:<\/p>\n<pre style=\"background: #07111f; color: #d7e6f7; border-radius: 14px; padding: 18px; overflow: auto; font-size: 14px; line-height: 1.6;\"><code>\/scripts\/restartsrv_cpsrvd<\/code><\/pre>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 16px 0 0;\">Once restarted, open WHM again using:<\/p>\n<pre style=\"background: #07111f; color: #d7e6f7; border-radius: 14px; padding: 18px; overflow: auto; font-size: 14px; line-height: 1.6;\"><code>https:\/\/your-server-ip:2087<\/code><\/pre>\n<\/div>\n<\/section>\n<div class=\"uh-divider-sm\" style=\"display: flex; align-items: center; justify-content: center; gap: 16px; margin: 40px auto; width: 100%;\">\n<img loading=\"lazy\" decoding=\"async\" style=\"width: 32px; height: 32px; display: block; border-radius: 8px; filter: drop-shadow(0 0 8px rgba(0,212,255,0.3));\" src=\"https:\/\/cdn.underhost.com\/android-chrome-192x192.webp\" alt=\"\" width=\"32\" height=\"32\" \/><\/div>\n<section style=\"max-width: 920px; margin: 0 auto 34px;\">\n<div style=\"background: #ffffff; border: 1px solid #e6edf5; border-radius: 18px; padding: 28px; box-shadow: 0 10px 28px rgba(15,32,64,0.08);\">\n<h2 style=\"margin: 0 0 18px; color: #0f2040; font-size: 28px;\">Common Issues and Fixes<\/h2>\n<div style=\"border-bottom: 1px solid #e6edf5; padding: 0 0 18px; margin: 0 0 18px;\">\n<h3 style=\"margin: 0 0 8px; color: #0f2040; font-size: 20px;\">License still shows invalid after running cpkeyclt<\/h3>\n<p style=\"margin: 0; color: #334155; line-height: 1.8;\">Wait 5 to 10 minutes and run <code>\/usr\/local\/cpanel\/cpkeyclt<\/code> again. If it still fails, the license may not be assigned to the server&#8217;s current public IP.<\/p>\n<\/div>\n<div style=\"border-bottom: 1px solid #e6edf5; padding: 0 0 18px; margin: 0 0 18px;\">\n<h3 style=\"margin: 0 0 8px; color: #0f2040; font-size: 20px;\">WHM is not loading on port 2087<\/h3>\n<p style=\"margin: 0; color: #334155; line-height: 1.8;\">Make sure port <code>2087<\/code> is open in the server firewall and not blocked by an upstream security rule. If you recently changed IPs, also verify the DNS or direct IP you are using to access WHM.<\/p>\n<\/div>\n<div style=\"border-bottom: 1px solid #e6edf5; padding: 0 0 18px; margin: 0 0 18px;\">\n<h3 style=\"margin: 0 0 8px; color: #0f2040; font-size: 20px;\">cpkeyclt reports the wrong IP address<\/h3>\n<p style=\"margin: 0; color: #334155; line-height: 1.8;\">This usually means outbound traffic from the server is leaving through a different IP than expected. Check your routing, NAT, main interface configuration, and any provider-side IP failover setup.<\/p>\n<\/div>\n<div style=\"border-bottom: 1px solid #e6edf5; padding: 0 0 18px; margin: 0 0 18px;\">\n<h3 style=\"margin: 0 0 8px; color: #0f2040; font-size: 20px;\">The wrong IP is configured on the server<\/h3>\n<p style=\"margin: 0 0 14px; color: #334155; line-height: 1.8;\">On older CentOS, AlmaLinux, Rocky Linux, or CloudLinux systems using legacy network scripts, check the interface file:<\/p>\n<pre style=\"background: #07111f; color: #d7e6f7; border-radius: 14px; padding: 18px; overflow: auto; font-size: 14px; line-height: 1.6;\"><code>nano \/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/code><\/pre>\n<p style=\"margin: 14px 0 0; color: #334155; line-height: 1.8;\">On newer systems using NetworkManager, use <code>nmcli<\/code> or your provider&#8217;s recommended network configuration method instead.<\/p>\n<\/div>\n<div>\n<h3 style=\"margin: 0 0 8px; color: #0f2040; font-size: 20px;\">The license is active but cPanel still shows an error<\/h3>\n<p style=\"margin: 0; color: #334155; line-height: 1.8;\">Restart cPanel services, clear your browser cache, and test from a private browser window. If the issue persists, check <code>\/usr\/local\/cpanel\/logs\/license_log<\/code> for the exact error returned by the licensing server.<\/p>\n<\/div>\n<\/div>\n<\/section>\n<section style=\"max-width: 920px; margin: 0 auto 34px;\">\n<div style=\"background: #07111f; border-radius: 18px; padding: 28px; color: #ffffff; box-shadow: 0 14px 36px rgba(0,0,0,0.22);\">\n<h2 style=\"margin: 0 0 16px; color: #ffffff; font-size: 28px;\">Quick Command Summary<\/h2>\n<p style=\"margin: 0 0 16px; color: #d7e6f7; line-height: 1.8;\">For experienced administrators, these are the core commands used during most cPanel license IP-change fixes:<\/p>\n<pre style=\"background: #020617; color: #d7e6f7; border-radius: 14px; padding: 18px; overflow: auto; font-size: 14px; line-height: 1.7;\"><code># Check the public IP cPanel sees\r\ncurl -s http:\/\/checkip.cpanel.net\r\n\r\n# Check local server IPs\r\nhostname -I\r\n\r\n# Refresh the cPanel license\r\n\/usr\/local\/cpanel\/cpkeyclt\r\n\r\n# Verify the license record\r\ncurl -s https:\/\/verify.cpanel.net | grep $(curl -s http:\/\/checkip.cpanel.net)\r\n\r\n# Restart cPanel services\r\n\/scripts\/restartsrv_cpsrvd<\/code><\/pre>\n<\/div>\n<\/section>\n<section style=\"max-width: 920px; margin: 0 auto 34px;\">\n<div style=\"background: #ffffff; border: 1px solid #e6edf5; border-radius: 18px; padding: 28px; box-shadow: 0 10px 28px rgba(15,32,64,0.08);\">\n<h2 style=\"margin: 0 0 18px; color: #0f2040; font-size: 28px;\">When Should You Contact Support?<\/h2>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 16px;\">You should open a support ticket if:<\/p>\n<ul style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0 0 16px; padding-left: 22px;\">\n<li>Your cPanel license was purchased through UnderHost.<\/li>\n<li>The server IP changed after migration or provider-side maintenance.<\/li>\n<li><code>cpkeyclt<\/code> reports a license error even after the license IP was updated.<\/li>\n<li>The server appears to be using the wrong outbound IP.<\/li>\n<li>You cannot access WHM after the license refresh.<\/li>\n<li>You are not comfortable changing network or license settings over SSH.<\/li>\n<\/ul>\n<p style=\"color: #334155; font-size: 16px; line-height: 1.8; margin: 0;\">For account-specific license changes, include the server IP, hostname, service ID if available, and the exact error shown by WHM or <code>\/usr\/local\/cpanel\/cpkeyclt<\/code>.<\/p>\n<\/div>\n<\/section>\n<section style=\"max-width: 920px; margin: 0 auto 34px;\">\n<div style=\"background: linear-gradient(135deg,#0f2040 0%,#082033 100%); border-radius: 20px; padding: 34px; color: #ffffff; text-align: center; box-shadow: 0 18px 42px rgba(15,32,64,0.25);\">\n<h2 style=\"margin: 0 0 14px; color: #ffffff; font-size: 30px;\">Need Help Fixing Your cPanel License?<\/h2>\n<p style=\"max-width: 720px; margin: 0 auto 22px; color: #d7e6f7; font-size: 16px; line-height: 1.8;\">If your cPanel license is still failing after an IP change, UnderHost support can review the license assignment, server IP, network configuration, and cPanel service status for you.<\/p>\n<div style=\"display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px;\"><a style=\"display: inline-block; background: #00d4ff; color: #07111f; text-decoration: none; font-weight: 800; padding: 14px 22px; border-radius: 12px;\" href=\"https:\/\/customerpanel.ca\/client\" target=\"_blank\" rel=\"noopener\">Open a Support Ticket<\/a><br \/>\n<a style=\"display: inline-block; background: #ffffff; color: #0f2040; text-decoration: none; font-weight: 800; padding: 14px 22px; border-radius: 12px;\" href=\"https:\/\/underhost.com\/managed-business-hosting.php\" target=\"_blank\" rel=\"noopener\">Explore Managed Hosting<\/a><br \/>\n<a style=\"display: inline-block; background: rgba(255,255,255,0.12); color: #ffffff; text-decoration: none; font-weight: 800; padding: 14px 22px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.25);\" href=\"https:\/\/customerpanel.ca\/client\/store\/server-management\/cpanel-server-management\" target=\"_blank\" rel=\"noopener\">cPanel Server Management<\/a><\/div>\n<\/div>\n<\/section>\n<section style=\"max-width: 920px; margin: 0 auto;\">\n<div style=\"background: #f8fbff; border: 1px solid #dbeafe; border-radius: 18px; padding: 24px;\">\n<h2 style=\"margin: 0 0 16px; color: #0f2040; font-size: 26px;\">FAQ<\/h2>\n<h3 style=\"margin: 22px 0 8px; color: #0f2040; font-size: 19px;\">Why did cPanel work before but fail after changing the server IP?<\/h3>\n<p style=\"margin: 0; color: #334155; line-height: 1.8;\">Because the license was likely assigned to the old IP address. cPanel validates the local server license against the public IP used by the server.<\/p>\n<h3 style=\"margin: 22px 0 8px; color: #0f2040; font-size: 19px;\">Does running cpkeyclt change my license IP automatically?<\/h3>\n<p style=\"margin: 0; color: #334155; line-height: 1.8;\">No. It refreshes the local license file and checks the license status. If the license is still assigned to the old IP, the license record must be updated first.<\/p>\n<h3 style=\"margin: 22px 0 8px; color: #0f2040; font-size: 19px;\">Can UnderHost fix this for me?<\/h3>\n<p style=\"margin: 0; color: #334155; line-height: 1.8;\">Yes, if your cPanel license or managed server service is handled by UnderHost, open a ticket from CustomerPanel and our team can review it.<\/p>\n<h3 style=\"margin: 22px 0 8px; color: #0f2040; font-size: 19px;\">Should I reinstall cPanel to fix an invalid license?<\/h3>\n<p style=\"margin: 0; color: #334155; line-height: 1.8;\">No. A license error after an IP change normally does not require reinstalling cPanel. Confirm the public IP, update the license if needed, then run <code>\/usr\/local\/cpanel\/cpkeyclt<\/code>.<\/p>\n<\/div>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to quickly resolve cPanel license issues after changing your server\u2019s IP address.<\/p>\n<p>html<br \/>\nCopy<br \/>\nEdit<\/p>\n","protected":false},"author":1,"featured_media":4853,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,70],"tags":[108],"class_list":["post-5021","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-control-panels","category-cpanel","tag-tag-cpanel"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/5021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=5021"}],"version-history":[{"count":4,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/5021\/revisions"}],"predecessor-version":[{"id":5689,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/5021\/revisions\/5689"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4853"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=5021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=5021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=5021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}