-
MODX Staff
- 10,725 Posts
Normally, all you have to do to move a MODx installation is:
* upload the files
* dump the database to SQL and then load it in the new database container
* change the database properties in the /manager/includes/config.inc.php file for the new database container
* [optional] make any modifications to the .htaccess file that might be required to support friendly URL’s in the new location
Once those steps are completed, you can login to the manager, update the appropriate System Settings (i.e. all the path properties for the editors, resource browsers, file managers, etc.), refresh the cache, and you should be good to go.
And I’m sure we’ll find a way to improve this process as we gather momentum.
i’m not sure i know how to ’dump the db to SQL and load it into the new db container’. is that easy? how do i do that?
also, could you provide more detail about what i need to change in the /manager/includes/config.inc.php file?
thanks!
"A great democracy must be progressive, or soon it shall cease to be great, and soon it shall cease to be a democracy." -Theodore Roosevelt
-
☆ A M B ☆
- 24,524 Posts
If your original site is logging visitors, you might want to empty the logging tables first, and the manager_log table in any case. They can be really big; I’ve had uploads timeout, and otherwise fail because of them. You can do this in phpMyAdmin by checking the boxes for the log tables then at the bottom where it says "With selected", select "Empty". If for some reason you don’t want to lose that data, you can remove it from the .sql file after you’ve dumped the whole database; I prefer to first make a dump of just the data (not the structure) for those log tables (which options can be selected in the SQL Options panel), then empty them, then make the dump of the whole database, then upload that data back again when I’m finished with the main database dump.
If you aren’t familiar with phpMyAdmin, you dump from the Export tab. You can select individual tables to dump from the upper left panel. But if you take a few minutes and carefully look at all the options in the window, you’ll do fine. (don’t forget to check the "Save as file" box in the lower left...or you’ll get a screenful of dumped database! You can copy/paste, but it’s a nuisance. Just make a note of where the .sql file is getting saved to on your computer.) Most of the time, you can leave everything except the "Save as file" as it is.
To load the .sql file into the new database, it’s the "SQL" tab. There is an option there to upload a file.
The only problems I’ve ever had was when I hadn’t updated my local copy of phpMyAdmin for a long time (like two or three years), and the hosting company I was uploading to had the latest version. There was some kind of issue with the comments in the .sql file. I just updated my local copy and everything went fine.
Hmmm, instead of using phpmyadmin to reload the db couldn’t you just use the installer with some tweeking?
:)
Tangent-Warrior

-
☆ A M B ☆
- 24,524 Posts
Not really, you still have to get the dump of your original site. I suppose you could use the Backup Manager, then use the installer, but almost all hosting companies provide access to phpMyAdmin as part of your domain’s control panel. And you also have to create the database in the first place, unless your hosting plan allows you to create databases with scripts.
Hi,
You can package your SQL dumps with the installer. All you have to do is replace your INSERT calls with REPLACE and then add the REPLACE statements to the bottom of your setup.sql file
-
☆ A M B ☆
- 24,524 Posts
In that case, select the options for "add drop table" (for the tables) and "export type REPLACE" (for the data) in the sql options panel, and skip the logging tables in the export panel when you make the dump, then just copy/paste your dump .sql file to the end of the setup.sql file in the installer. I would do it this way to make sure any additional tables (such as for the Photo Gallery module) get moved as well.