How many times have you modified your site but the mod went wrong and you wish you had backed up first, this makes creating that backup very easy with just a single click.
This contribution creates a zip file of your entire site (excluding the database) for immediate download to your computer so making creation of a site backup quick and easy with just a single click.
Your backup, cached and sessions folders will be excluded, others can be easily added.
The code will check the user is logged into admin at all stages, so only administrators are able to obtain and download the compressed site copy.
Two zipping methods are provided, File and Memory (streaming).
File Mode Zipping.
The file method first creates a temporary zipped copy of the website within your backup folder then immediately provides the download of that, the temporary zipped copy is then immediately deleted. This process uses very little memory so will always work as long as there is sufficient disk space to store the temporary file.
Memory Mode Zipping.
With this method the zipping all occurs within memory and at the same time the download is provided (streaming). Memory usage is still relatively low so should not prove an issue, however this requires at least PHP Version 5.1.2, if your server has less than that the memory mode zipping option will not appear.