We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16311
    • 28 Posts
    I realise I might be missing something obvious, but I can’t seem to figure out how I can migrate a modx site to another server/url without all the image paths in my image upload TVs needing to be changed. I’m aware I can change the ’Resource URL’ in the config so that any new images that are added/uploaded via image upload TVs will the have the correct path, but what about all the existing content?

    Can anyone point me in the right direction?
      • 14385
      • 31 Posts
      as long as you keep the same file structure as you have now you shouldn’t have a problem.
        • 22303 MODX Staff
        • 10,725 Posts
        If the url is changing, then you have a problem unless you originally specified the resource url as a path relative to your site root.
          • 16311
          • 28 Posts
          Thankyou for your responses, however I still don’t really understand how to handle this. Is is recommended that ’Resource URL’ be a relative url, such as how mine is at the moment (it’s currently set to: assets/)? The default value after installation has each time been an absolute url for me, and the help text under the field in config states that the resource url should be such as you would enter in Internet Explorer. Is that just to indicate that it should be a url and not filesystem path, or is it suggesting I should use an absolute url? I’m just confused since it’s easy to change the resource url whenever the sites location changes, but it isn’t so easy to go into every document and change the path of the every image tv that has the old url in it. [Edit: I mentioned image tvs, but it’s also the paths of images inserted into rich text fields that need fixing ]

          I’m hoping I’m just completely getting this all wrong. Is that the case?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            It should be a URL, not a filesystem path. I usually have /assets/, but assets/ should also work.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 16311
              • 28 Posts
              Okay thanks, I’ll keep on with assets/ in that case.