No, it’s not. For the most part, with the exception of a couple of Extras that have stored paths and different versions of PHP between your dev and production environments this should be relatively straightforward. In my opinion, the most effective way to do migrations is via MySQL dump and rsync over the command line but it can be done via SFTP if needed.
Here’s the fastest way to do it via mysqldump/rsync.
This method requires the destination Cloud to have an install of MODX of the same version as the origin/dev environment.
Via the commanline on your dev environment, export the db using mysqldump as follows by running the command with appropriate replaced with the real names.
mysqldump --add-drop-table -u <user> -p <db_name> > db.sql
To avoid bringing over unnecessary things create a rsync.filter
file to tell rsync
which files to bring over and which to omit by using your commandline text editor and placing this in the root of your source site:
+ /assets/
+ /assets/*
+ /core/
+ /core/components/
+ /core/packages/
- /core/*
- /core/packages/core/
- /core/packages/config.core.php
- /cgi-bin/
- /manager/
- /phpmyadmin/
- /phpMyAdmin/
- /setup/
- /index.php
- /config.core.php
- /connectors/config.core.php
- /rsync.filter
Then from your dev or source environment in the webroot directory of the site you’re planning on moving, run the rsync
command as follows, with the appropriate replacements:
rsync -azvvP --no-p ./ <username>@<domainname.com:filepathtowebroot> --filter=". rsync.filter"
Finally, import the db (that was in the webroot of the files you just moved to the destination server). SSH into the destination server and run the following from the webroot:
mysql -u <user> -p <destination_db_name> < db.sql
Make sure to change the fields above.
There are other ways to do it and you don’t always have SSH access on your destination server, but where you do, this literally takes minutes when you follow the steps.