How to move your MODx website to a subdomain

article header image

A while ago, I needed to move an existing custom-themed (named ArtDeco) MODx Evolution 1.0.3 website from the main domain to a subdomain on the same server. As I’d never moved a MODx site before, I set out searching. What I found was bits and pieces of information, mainly dealing with a move from one server to another. But nothing on an internal move. It seemed logical that this would actually be less complicated than a server-to-server move, so I decided to just do the move, and see what happens. It turned out to be quite simple. Just follow these steps, and you should be home free!

1. Create the subdomain

2. Using FTP, copy the ‘Assets’ and ‘Manager’ folders, as well as the ‘ht.access’, ‘index.php’ and ‘index-ajax.php’ files to the subdomain folder.

3. Log on to the MODx manager on the main domain, and adjust the following paths from Tools –> Interface & Features:
a. File base path: /var/www/vhosts/yourdomain.com/subdomains/subdomain.yourdomain.com/httpdocs/assets/
b. CSS path: /var/www/vhosts/yourdomain.com/subdomains/subdomain.yourdomain.com/httpdocs/assets/templates/mytemplates/ArtDeco/styles/main.css

4. That should be it. Now check your subdomain to see if the site is online, and you can log on to the manager.

5. If that all works, move the files & folders from step 2 from yourdomain.com to a temporary folder.

6. Check again if the site and the manager work properly.

7. Remove the temporary folder once you’re sure everything is working.

That’s it. For a CMS, MODx seems to be built in quite a simple fashion, allowing for such an easy process!


foto Boris Hoekmeijer
My name is Boris Hoekmeijer, I'm a webdesigner and graphic designer.
I sometimes run into a problem for which I have to find my own solution because Google just won't tell me. That's when I climb behind my mechanical keyboard, and fire away until a tutorial materializes. One of the great things about the web: we can all help each other!
If this article has helped you, or if you have anything to add or ask, please leave a comment or share the post.
Cheers!

© 2010 ★ Published: November 3, 2010
3 Comments

  • ispacecrusader says:

    I’ve checked, and on my site, the base URL setting is in the chunks. For example the navigation menu uses the base URL path for its internal links to the various pages. It says:

    [[code]][[/code]]

    This way, it’s independent of where you put your MODx installation. Perhaps you have something else configured there?
    Good luck!

  • richard says:

    already fixed it by empty cache option now looks all good,

    thank you

  • richard says:

    thank you for your tutorial, i tried this with my site, but then from maindomain/modx to maindomain. And it looks like it works, the only problem i have is that the internal links in my site do not change, they still show the old links. /modx/?id=
    i think this has to do with the base url setting.. do you know how to change this?

    thank you

Leave a Reply

Your email address will not be published. Required fields are marked *