Sync gpEasy installs with WinSCP

This tutorial will teach you how to use the FTP client WINSCP to synchronize your localhost gpEasy CMS install with your server/web site install of gpEasy CMS. Learning this tutorial will make life a lot easier when dealing with gpEasy upgrades, backups, working form the local installation, etc.

Prerequisites

You need to have a localhost install of gpEasy (see the xampp tutorial). You will also need a server to sync with. You can either install gpEasy into the server via another method or with the first sync you can upload your entire gpEasy local install to your server. You will also need to download WinSCP, install it, and set it up with your server settings so you can access your server with WinSCP. WinSCP has lots of documentation so you should be able to get it up and running on your own. Tutorials to read before this one: Xampp Lite Install & gpEasy Install.

The pictorial tutorial below has most all the information in the step by step tutorial that comes after it. A bit of redundancy isn't always bad.

WinSCP Sync Tutorial

Step 1
Launch WinSCP and login to your server.

Step 2
On the left side panel of WinSCP navigate to your local install of gpEasy.

Step 3
On the right side panel navigate to your server's install of gpEasy.

Step 4
Choose the folders you wish to synchronize. In general there are two folders that you will synchronize between installs when dealing with gpEasy CMS. They are the data folder and the themes folder. The other folders are rarely synchronized except during problems or upgrades. At this point let's choose the data folder. Open the data folder in each pane, so it's open on both the server and the local install panel.

Step 5
Now in WinSCP go to the file menu, then commands, and click synchronize.

Step 6
There are several setting in the sync command dialog that will appear. The default setting are best. Basically you want to sync from you local installation of gpEasy to your server. In general you will keep your local install as your working installation and only sync when you want to update your server. Therefore, you will keep the target directory as remote. There may be times you want to change that but in general you want to work from your local install and sync the server. The mode will be synchronize files. This is the safest bet. It's working in one direction thus you don't have to worry about suddenly having both installation go bad. As for sync options I generally go with modification time and preview changes. My server works with modification times but yours may or may not. The preview option allows me to see what's going to be synchronized before it is done. This is nice because if I've deleted files on the local install it will show those files and give me the option of having them deleted with the sync. I generally don't go with the 'delete files' option because I may make a mistake and move a file or something dumb and I don't want the sync to automatically delete files. I would rather be in control of that with the preview. Finally, you can check 'use same options next time' so all your setting will be saved. Also note the pathways. They both should be pointing to the data folder.

Step 7
Click OK. WinSCP will check your local files against the server files and then give you a preview of what's to be synchronized. If everything looks correct in the preview click OK and WinSCP will synchronize your data folders.

That's all there is to synchronizing a folder with WinSCP. You can make bookmarks in WinSCP to quickly navigate to the folders you want to sync then just click the sync command. If you are really adventuresome you can read WinSCP's documentation on scripting to setup a script that will do all of it automatically. Personally I like the hands on approach since I don't sync that often and it's usually just the data folder.

How to use the sync when upgrading

As you can tell once you have a local install of gpEasy on your computer it's easy to sync it to a server; therefore, when you want to upgrade your localhost you do just that. Make sure everything works properly on the local install and when you are sure everything is fine you just sync the include folder and wallah, the server is upgraded.

It may be a little effort getting WinSCP up and working properly but in the long run you will be glad you did. 

Make sure you backup your local install (the entire xampp & gpEasy install) on a regular basis in case of disaster. If such an event should happen just unzip your backup and you are right back in the game. 

Having both a local install and your web site also allows you to know when a problem in gpEasy is actually a gpEasy problem and not a server problem. Furthermore, you save bandwidth and time working from you local install as it's much quicker to work with and you aren't constantly accessing pages on your site which could cause your visitors some problems as well.

It might sound like a lot, getting xampp lite going with a gpEasy local install and WinSCP but it really isn't. Just take your time, play with it. . . after all it's a local install and if you mess things up just start over. Now head on back to the gpEasy tutorials.

 

gpEasy B2sq Theme by CS @True Acupuncture