Okay, when I’ve upgraded my sites in the past, I’ve always used the simple method of overwriting the existing files with the new files, but it’s been suggested to me that this isn’t the best idea. The wiki gives an alternative method, but I’ve got some questions about it that maybe someone can help me with:
1. Download everything from your site.
2. Make a copy of your database.
3. Basically, make sure you have all the old files backed up so that you can restore the old version if you need to.
4. Create a new local directory called MODxNew (or whatever you prefer).
5. Extract the new MODx files to that directory.
6. From your backup, *copy* the config.inc.php file to manager/includes
7. Copy any snippets you need into the appropriate parts of MODxNew. How about plugins also? I’m guessing so.
8. Copy any images, css, template files etc into the appropriate parts of MODxNew. I assume this is telling me to copy the relevant parts of the assets folder? E.g., assets/docs, assets/images and so on
9. Rename the new folders/files to "index.php-new", "manager-new", "assets-new". Also rename index-ajax.php? Don’t rename "install". Upload them (and install). What does it mean install at this stage? We seem to do the install in step 13. Am I being told to do it twice? If so, what does it achieve here? If not, what am I supposed to be doing? This takes a while.
10. Switch the names of the existing folders/files to "index.php-old", "manager-old", "assets-old".
11. From this point, your site is not working.
12. Change the names of the newfolders/files to "index.php", "manager", "assets". Do I also move these from MODxNEW (or whatever) to the site root. Iassume so, otherwise there won’t be a yoursite.com/install to run in the next step.
13. Run yoursite.com/install in your browser, being sure to select Upgrade. See Installation Guide for more information.
* NOTE: If your MySQL version is older than 4.1, select the Advanced Upgrade and use cp1251_koi8 as the Connection character set because the the only allowable value for charset_name is cp1251_koi8 before MySQL 4.1. It is possible to add new character set mappings by editing the sql/convert.cc file in the MySQL source distribution though, so you might be possible to use other charsets too.
14. From this point, your site should be working again. If it isn’t, switch the folder names back!
15. You should then be able to delete all the -old directories.
16. You should also, as a result, have a local backup of the old site, and a local backup of the new site.
Any suggestions?
Thanks!
-
☆ A M B ☆
- 24,524 Posts
4) That’s a LOCAL directory, just for unzipping the files and preparing them for upload.
7) Yes, snippets, templates, modules, whatever you have added to customize your original installation. If you miss anything at this point, it’s easy enough to copy it from the original installation folders.
9) Now you upload the prepared "new" folders/files. That’s referring to the install folder at that point, just upload it without adding the -new to its name, since you don’t have an old one to begin with. So you will upload the file index.php-new, index-ajax.php (doesn’t really matter, I believe this is primarily used by the ajax-search snippet) and the folders manager-new, assets-new and the folder install.
I always do it this way, so the site is down for a minimal amount of time. If you upload the new files to overwrite the old ones, the site will crash until you’ve run the installer, and sometimes it take me two hours to get everything uploaded when my connection decides to go flaky (except when I SSH in and move things around, but that’s another problem for another story!). This way, you can get the uploading done, then just rename the folders (originals to -old and remove the -new) and run the installer right away. Plus advantage to this is that if something does go wrong (dozens of upgrades without a whimper for me) you only need to quickly rename the folders and the index.php file back and import the backup sql to recover, two minutes at most.
I also tend to leave the "-old" stuff in place for a week or two (unless disk space is at a premium) just in case something comes up, before I delete it.