Yes. I am typing some notes up for you now. Please stand by
Question: Does you host have any kind of file manager which will allow you to move folders, upload files etc.?
Sorry for the immense amount of text. I bolded the critical areas. Do you have the ability to backup your mySQL database? I do have some SSH that I have used, but it may be different on each hosting environment. Usually, you can back up the database using phpMyAdmin.
I recommend you place some test folders on the server and take the commands for a test spin so you can get more comfortable. Hope this helps and doesn't hinder.
Follow the instructions on updating a MODx install. Backup the folders and files. Delete contents of core/cache. Yadda Yadda. Then when you run setup, make sure it is giving you the option to update existing install. Do not run a new install or there will be problems.
You will doing a few tasks, all in line with the MODx update instructs.
You’ll be uploading the new version of MODx with either the host file manager or an ftp site and unzipping it on the server. Do not unzip on your desktop and upload the files. This will cause all kinds of permission issues. Trust me on this. Some hosts do not allow SSH to unzip a file on the server. So before spending hours trying to do it… confirm it with your host. You may need host support to unzip the archive for you. As well, if a file manager is available, use it to unzip the archive if that function is supported.
Then you’ll be backing up your files, which can be stored in a zip and downloaded for safekeeping.
Backup your database too!
Backing up cannot be stressed enough. Store a backup on the server. Download a copy to your desktop. If anything goes south, you’ll have recovery options.
A brief overview with the Merge using SSH. You are basically going to send a command to go get a folder at a specific location and then move/merge it with the same named folder in another location.
So when you upload and unzip the archive of the new version of MODx, there should be a a folder called modx-2.2.14-pl or whatever the version name is. Use your host file manager so you can see what’s happening.
Then, assuming you set up your site like I do, the modx directories are out in the root. But it really doesn’t make any different because your command line are calling out the paths directly to the directories you are working with.
If your hosting plan is capable of hosting multiple sites, you made need to first get in to that directory by changing directories.
So on my hosting plan I would log in via SSH to the root and then navigate to the site / domain I wanted to make changes in. In my case it was based on domain name
cd /path/to/the/folder/to/work/in/myDomainName.com/
Think of as SSH is logging you in the front door of a house and cd is plopping you into a specific room in the house.
What I did early on was load some test folders and files, and practiced on those so I could see that what I was doing was working.
TO LOG IN WITH TERMINAL
type
ssh followed by one space and then your username
press return or enter
you’ll be prompted for a password
type your password and hit return/enter
If all goes well, then you’re in! Otherwise, it will prompt you that the login is incorrect or user is incorrect. Sometimes the error messages are clear. Some make sense to only a few individuals on the planet:)
LETS BACK UP YOUR DIRECTORIES
The following will take the directory of your choosing, make a copy, and then rename is with the name you give it. I tend to throw in bu and a numeric date so I can keep them organized.
shopt -s dotglob; cp -R /path/to/directory/directoryToBackUp/* /path/to/directory/directoryToBackUp_bu111214/
The first part of the string prior to the asterisk is leading to the folder to be backed up. The second part is renaming it.
Note—this function may be something you can do with the host File Manager if one is available. Definitely do whatever you can with a file manager. It’s easier. Less stressful and you can sort of see what you’re doing.
If you can use a file manager to drag all of your backed up archives in to one folder and zip them, it will be much faster for download. On mac, the zip will automatically unpack, but the actual zip will be in the trash. Go grab that zip. It’s the backup you want in case something goes wrong and you need to post them back on the server
COMMANDS FOR ZIPPING.
This works for me. navigate to the directory your backups are located in.
1. Navigate to the directory
cd /path/to/directory/that/contains/myBackups/
2. Run the backup SSH
zip -r myBackup_083014.zip myBackup_083014/
To explain this, I might have a general folder called myBackups. And in that folder I have created another folder containing backups done on a certain date. For example: myBackup_083014 is the folder for backups done aug 30 2014. That command to zip finds that folder and zips it and its contents up. Then I download that zipped file to my desktop for safe keeping.
DO THE MERGE
This is the SSH to do with each directory to back up.
cp -R /path/to/folderToMerge* /path/to/folderToMergeInto
I write these out in a text document and then copy and paste in to terminal, rather than typing in terminal. I find it safer that way. Missing spaces, additional forward slashes, anything not typed exactly correct can return an error at best, and wreak havoc at worst.
So the merge command might look something like this for when you do the connectors.
cp -R /path/to/your/folder/in/yourSite/modx-2.2.14-pl/connectors* /path/to/yourSite
The above goes to the connectors directory inside the modx-2.2.14-pl folder and then merges it with the folder with the same name out in your root. Note: You don’t retype connectors at the end because the SSH command will find that folder and merge into it.
Just repeat this command with each mods directory. (core connectors and manager)
If you have cPanel, you can just highlight all the files and directories in File Manager and compress them into a .zip file, then download that file to your local machine for safekeeping.
BTW, the SiteCheck utility will do a full backup of the database to a .sql file for you if you check the "fix" box, but it can be a challenge to get the path to the mysqldump file correct if the default setting doesn't work.
http://bobsguides.com/sitecheck-promo.html
I think BobbyG66 said there is no cPanel. If it were me, I would pack up that site and move it to a MODx friendly host with cPanel in a heartbeat. A wise man (a.k.a. BobRay) once told me that. Best advice ever!
http://bobsguides.com/modx-friendly-hosts.html
That said, a lot of times the client has paid in advance for a long period of hosting and won't budge on moving the site.
Personally, I wouldn't take a client on with a site that didn't have cPanel, but not everyone can afford to be so picky.
mmcgee and BobRay,
Thanks for all the help on this.
All the steps work fine up until the last merge step.
I tried all kinds of Linux commands and could not get it to work.
Will look at BlueHost for the next site I build.
I am going to try and update the site locally, then upload.
That will hopefully work better.
Thanks
BG66
Skytoaster is excellent. You might investigate them as well.
Aside from hosting, what was the last merge step you are referring to. Was it just whatever one you happened to be doing last?
I'm sorry to hear that you had issues, and that it messed with the live files.
Yes, when there are sub domains involved, the path would need to be complete, from the very beginning root of the site all the way out to the exact folder to target. The string can get very long, but it does work. On the server I use this method at most – that contains mulitple subfolders, the path is something like /var/www/siteFolderName or domainName/public_html. You have to look at the overall site structure with the host file manager to assess and determine what that path is.
It does get tricky, but once you have it input correctly, it should work terrific.
Often, I upload some test folders and files and run tests on those.
Having said this, since I moved to skytoaster, I've noticed that I spend more time developing my skills as a web site designer/developer, and less time troubleshooting servers and updates to MODx. They use Softaculous. MODx installs and updates takes literally under 5 minutes. Support is excellent. I know enough to be dangerous and certainly ask a lot of novice questions. They are always helpful and supportive.
I know there are situations when changing the hosting is not an option. I have 5 sites now that I would love to move, but I can't. Having lived in both worlds, all new MODx sites go to MODx friendly hosting. The hours saved have been incredible.