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!
webdesign tutorial moving modx to subdomain - modx logo

3 thoughts on “How to move your MODx website to a subdomain”

  1. ispacecrusader

    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!

  2. 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 Comment

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

Scroll to Top