How to Upgrade Sendy from Version 5 to 6 from the Shell via SSH

I’m using Sendy for our newsletters. Recently, verison 6 was released. Here’s how I updated like a pro on my VPS via SSH.

The beginner-friendly but ultimately drag-and-drop/FTP-based online instructions assume that you will be moving files over from “new location” to “existing location”. That’s quite cumbersome when all you have is SSH.

Here’s how I translated the steps to the shell to merge the v6 files into your v5 installation.

Note: I assume Sendy is installed in the ~/ directoy, on the server. Replace this with your actual settings, of course!

Prepare the files on the host

You can prepare the host whichever way you like, as long as the result is an unzipped v6 directory and your old v5 installation on the host machine.

Here’re instructions assuming ~/ on the host is the existing v5 installation, and ~/sendy/ will be the unzipped v6.

  1. Download the latest Sendy version locally using your license key: – I didn’t find a way to bypass browser-based download. So no wget download to the server this time.
  2. Copy the .zip to your host via scp, e.g. using:

     me@local:~/Downloads $ scp
  3. ssh onto the host machine:

     me@local:~/Downloads $ ssh
  4. Backup your current install into an archive (replace paths as needed):

    admin@server:~/ $ tar -czf sendy-bak.tar.bz2
  5. Finally unzip Sendy into a new directory:

     admin@server:~/ $ unzip
     # This is what we'll be working with:
     admin@server:~/ $ ls

    The file will unzip into sendy/ by default: so make sure you don’t run into directory name conflicts or change the destination.

Perform the upgrade from the terminal

Now perform all the update instruction steps, but from the shell. One by one:

# Copy existing .htaccess file
admin@server:~/ $ cp sendy/

# Copy existing config file
admin@server:~/ $ cp sendy/includes/config.php

# Merge v6 into v5 (AFTER THE BACKUP, SEE STEP 4 ABOVE)
admin@server:~/ $ rsync -ar --progress sendy/

Note we skipped two steps:

  • Transfering language files, because we’ll be merging the new installation’s locale/ directory with the existing one;
  • Removal of the uploads/ subdirectory, because rsync’s merging does not remove files in directories – with these options at least.

rsync does a lot of things the DWIM (Do What I Mean) way by default. Drag-and-drop copying of new files over existing ones can – depending on your OS! – replace contentful directories with empty ones, or merge them, or skip empty source directories.

We did have to preserve two important files, though: .htaccess and includes/config.php. That’s why we need to either remove them from the source (the v6 folder) or overwrite them. That’s a two-way merge, so to speak, where we merge setting changes into the freshly unzipped folder, then copy everything over into the old location

If want to do a two-way merge on existing the language files and uploads, too, excluding English language files as the docs instruct, use:

# Transfer existing uploads
admin@server:~/ $ rsync -ar --progress ~/ sendy/uploads/

# Keep custom language files, except en_US, which Sendy ships with
admin@server:~/ $ rsync -ar --exclude "en_US/" --progress ~/ sendy/locale/

But that’s not necessary. And depending on your amount of uploads creates waste by duplicting the files.

As always, if you want to verify what would happen (to check if skipping English really worked), add the --dry-run flag, e.g. before --progress.


If you botched up the copy process, remove the broken install and unarchive your backup (YOU DID MAKE THE BACKUP, RIGHT?):

# Remove broken install (not rm'ing, just moving away)
admin@server:~/ $ mv{,_broken}

# Unarchive into ~/
admin@server:~/ $ ls
sendy               # The extracted v6
sendy-bak.tar.bz2   # The backup archive

admin@server:~/ $ tar -xzf sendy-bak.tar.bz2

admin@server:~/ $ ls
sendy               # The extracted v6
sendy-bak.tar.bz2   # The backup archive  # NEW: The restored backup


If everything works, download the backup to your machine …

# On your computer:
me@local:~/Downloads $ scp \

…, remove it from the host, and remove the unzipped v6 files and the download:

admin@server:~/ $ rm -rf sendy/ sendy-bak.tar-bz2