How do I compress PHP files in cPanel?

Avatar
  • Answered
I can't seem to add a .PHP file to a ZIP archive while I can add files of other types with the same permissions from the same directory. Is this a security feature that can be disabled?

Cheers,
Will
Avatar
Tim S.
Hi Wisar,

Thanks for posting your question. I'm more than happy to assist you. I'm not aware of any security measure that would prohibit adding a PHP file to a ZIP archive. I went into my own VPS and attempted to add a test PHP file into a ZIP archive. It succeeded in creating a ZIP file with the PHP in it.

I did this through cPanel. Once in cPanel went to file manager and right clicked on the file. Then selected the "compress" option from the dropdown. At the prompt select "add to ZIP archive" and it will automatically compress the file for you.

If you need further assistance please feel free to contact us.

Thanks!

Tim S