On my WordPress site I installed the UpdraftPlus plugin to automatically perform remote backups.
The plugin needs to be able to launch a Zip executable to function correctly. However, the plugin consistently returns an error when it tests for its presence.
The log specifies this test: Testing: /usr/bin/zip
I contacted the plugin support, which told me to check with the host whether it is possible to enable Zip execution from my account (shared server).
Has anyone encountered this problem before? How can it be fixed?
oh man I’m unable to do this...
And I don’t see myself touching the plugin’s code.
The Updraft plugin is supposed to query the server and call the ZIP compression executable. If it can’t find it on the server, apparently it uses its own, which would be less performant...
The most likely cause is that OVH doesn’t have the zip executable in the path where UpdraftPlus looks for it. If you can’t force the plugin to use its own compression, contact OVH support to confirm whether the zip command is available in their infrastructure and, if so, which exact path you should use so the plugin can find it.
To confirm it yourself, the most direct option is to create a temporary PHP file with phpinfo(); and check the environment variables section to locate the PATH. If the command is available, it is usually found in the system's standard directories. If it doesn't appear, it's most likely not installed or the plugin is looking in the wrong path.
I’m telling you this because they may take a little while to get back to you
I created the phpinfo file. I get the configuration output, but what exactly should I check in it? You mention the “environment variables section”, uh what does that mean?
zip is indeed located in /usr/bin. Verified on cluster031.
$ which zip
/usr/bin/zip
$ file /usr/bin/zip
/usr/bin/zip: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=133949113da2500c1b316f37a104ff4d3773d4a3, stripped
$ /usr/bin/zip --version
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon. Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.
Compiled with gcc 6.3.0 20170221 for Unix (Linux ELF).
Zip special compilation options:
USE_EF_UT_TIME (store Universal Time)
BZIP2_SUPPORT (bzip2 library version 1.0.6, 6-Sept-2010)
bzip2 code and library copyright (c) Julian R Seward
(See the bzip2 license for terms of use)
SYMLINK_SUPPORT (symbolic links supported)
LARGE_FILE_SUPPORT (can read and write large files on file system)
ZIP64_SUPPORT (use Zip64 to store large files in archives)
UNICODE_SUPPORT (store and read UTF-8 Unicode paths)
STORE_UNIX_UIDs_GIDs (store UID/GID sizes/values using new extra field)
UIDGID_NOT_16BIT (old Unix 16-bit UID/GID extra field not used)
[encryption, version 2.91 of 05 Jan 2007] (modified for Zip 3)
Encryption notice:
The encryption code of this program is not copyrighted and is
put in the public domain. It was originally written in Europe
and, to the best of our knowledge, can be freely distributed
in both source and object forms from any country, including
the USA under License Exception TSU of the U.S. Export
Administration Regulations (section 740.13(e)) of 6 June 2002.
Zip environment options:
ZIP: [none]
ZIPOPT: [none]
As @Gaston mentioned, what exact error are you getting?
The zip command is installed and working on your host, as you’ve verified. The issue isn’t that it’s unavailable, but that UpdraftPlus isn’t finding it in the correct path.
To have the plugin detect it, the most straightforward solution is to force the path manually. You can do this by adding the following line to your WordPress wp-config.php file:
Or, if you’d rather not touch the code, go to UpdraftPlus’s advanced settings and see if there’s a field where you can manually specify the path to the zip executable. You would put /usr/bin/zip there.
We’re waiting to see your errors so we can guide you better