Changing numerical IP address on existing host? Topic is solved

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
gpetty
New Member
New Member
Posts: 6
Joined: Sat Mar 06, 2021 7:09 pm

Changing numerical IP address on existing host?

Post by gpetty »

I'm running the latest CMSMS on a virtual Linux machine whose assigned numerical IP address may need to change in the future. What must be done to ensure that everything still works correctly after the change? From one early experiment, it appeared that a number of resources needed for page styling etc. became unavailable after the IP address change, and the only quick way I could find to fix it was to do a clean reinstall under the new IP address. That was fine for a fresh copy with little content; it will be less acceptable later. Is it a matter of changing something in the database, or can this be managed through the administrator portal?

Context: this is an Amazon EC2 instance with an elastic IP assigned, no domain or hostname name attached, so I'm accessing it as http://3.227.xxx.xxx It may be necessary in the future to attach a different IP address to it for organizational reasons.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Changing numerical IP address on existing host?

Post by DIGI3 »

Since 2.x it shouldn't be necessary to change anything, unless you've hardcoded paths or have any paths in your config.php file (they shouldn't be needed in most cases, you can comment them out). You may need to clear the cmsms cache after the change, but theoretically that shouldn't be necessary either.
Not getting the answer you need? CMSMS support options
gpetty
New Member
New Member
Posts: 6
Joined: Sat Mar 06, 2021 7:09 pm

Re: Changing numerical IP address on existing host?

Post by gpetty »

I'm running 2.2.15, but for some reason things broke anyway. I'm not hardcoding anything - this was a fresh install with no site-level modifications, and just a couple of simple content pages created with provided templates/styles. That said, I remember now that I first noticed the problem (with all pages) after trying to replace the default homepage with a different homepage -- the pages seemed to have lost access to the usual resources, even though the basic content came up in primitive form. The wheel would spin, and they never finished loading. I tried restoring the original homepage, but the problem continued. In short, I can't be certain exactly what broke things, but the inability to access resources seemed to point to an addressing problem.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Changing numerical IP address on existing host?

Post by DIGI3 »

I don't think it should be necessary, but if all else fails you could enter the new IP as the root url in your config.php file. See https://docs.cmsmadesimple.org/configur ... g_root_url. Clear the cmsms cache after doing this, or any other changes to ip/dns.

Really all you should have to do is close any browser tabs still on the old ip, and revisit the site at the new ip, logging in again. Clear your browser cache or use incognito mode if you still encounter issues. The server doesn't care if the IP changes, but the browser will.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “CMSMS Core”