zip command on backend server

  • Unknown's avatar

    I’d like to serve a different zip file to each of my clients. There’s a standard linux command ‘zip’ that lets you create zip archives, and ideally I’d like to create these tailor-made zip files through the php exec function, e.g. <?php exec(‘zip archive.zip file1 file2’) ?> .

    Unfortunately, the default wordpress server doesn’t come with the zip command in any of its bin folders. I’ve tried uploading the 7zip executable to my server, and this works fine when I’m ssh’d in to the server, but it doesn’t work when using the php exec function. I imagine wordpress prevents non-bin executables from running (this is backed up by me trying to run a simple shell script using exec).

    So I guess what I’m asking is: why isn’t zip a default command in the wordpress servers? Can it be added? If not, how can I get around the blocks placed by wordpress preventing me from running executables using php’s exec?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there!

    Since you have a Business plan, you can access priority email and live chat support. You can access this priority support from your account page, where you can get help more quickly than by posting in the free public support forums.

    https://wordpress.com/help/contact

    Support will need access to your site’s backend, so reach out at that link and they can better advise on the server issue.

    Thanks!

  • The topic ‘zip command on backend server’ is closed to new replies.