Changing URL address will mess up my site?

I want to change the URL address for my website to something shorter and, I suspect, if I do this with the new URL that I purchase it will mess up my MODX website, some link might get broken or something?

Can anybody advice me how to go about this once I delete my old URL address and replace it with another, what I have to do in the back end MODX part of my site?

Unless configured otherwise, MODX automatically detects the current url and uses that where needed. If you’re changing domains and have not hardcoded the domain, that’ll adapt automatically.

If it’s moving across subdirectories or the server paths change, it’ll be a bit more work and you’ll likely need to edit core/config/config.inc.php. It’s worth running the setup after that as it will check paths are correct.

Thanks for this, Mark. I’m new to MODX and the guy who usually sorts this stuff for me is really busy so I have to start to learn how to do things myself and it’s all rather confusing.

How do I run the ‘setup’ and what will ‘setup’ do?

Setup checks updates all the file paths and installs base MODX software. It also sets up some of the configuration settings to link to the right folders, clears some caches that contain old settings the site manager uses. If anything is amiss, it will alert to to what needs to be done and then halt the setup procedure.

After setting up a site, the default is to delete the setup folder, for security reasons, so you may not actually have that installed now. Go to [yourdomain.com]/setup . Does anything happen? If you see a MODX setup screen, you’re in luck; just run through the process and hit OK to everything. If you get “page not found”, then you’ll have to reinstall the setup folder, which you’ll have to get from the original MODX package you installed.

You download the appropriate version of MODX (the same one you have installed), upload just the setup directory to your server, and then run it by browsing to yoursite.com/setup as @snowcreative mentions. Just follow the steps after that, should just be a case of clicking next a few times if all is correct.

In this context, running setup is useful to make sure the paths in the config are correct as it will show an error if something’s not quite right. I can also rewrite config.core.php files and tests a few other things.

If you find it all very confusing, it might be easier to use the UpgradeMODX Extra to trigger the Setup. This great little tool from from Bob Ray can be installed with no Developer knowledge, and during the Upgrade/Setup, you can change the URL to your new one, and as the others say, MODX will take care of the rest.

To Install go to Extras > Installer, Click Download Extras and search for UpgradeMODX. Download and Install and after that, follow the really simple instructions.

Good luck!

Ok, I’m finding this way too confusing and way outside my knowledge base.

I looked into the: core/config/config.inc.php as suggested above and there is nothing in there that I can see that that changing it would fix things.

I’ve now been in touch with 1&1 hosting and deleted my old URL address and have purchased a shorter more suitable one, which is connected up to my site. But, the site no longer displays photos and images and there are no background colours, nothing, just black text on a white background and the formatting is all haphazard and all over the place.

Any suggestions, please.

This seems like a mess, but a few quick and easy steps should solve most things. It sounds like you aren’t loading the CSS and images so I believe it is a file path issue.

Login to the Manager and do the following:

On the top bar, go to Manage > Clear Cache > Refresh URIs

If this doesn’t help, run Setup using the UpgradeMODX Extra:

Extras > Installer, Click Download Extras and search for UpgradeMODX. Download and Install and after that, follow the really simple instructions.

This will run Setup and as you are doing it on the new, short domain, will force it to update all the URLs in config files.

It would also really help if you gave the new, shorter domain, to see what the problems are.

Good luck