Solid Backups relies on three different ZIP utility tools in order to properly zip your backup, so it’s important to understand the differences between each of these utilities and find what’s best for your server and its configuration. The three different types of ZIP utility tools are exec, ZipArchive, and PclZip respectively. Solid Backups will test each one of these and use the one that is available in the server’s PHP configuration, which in most cases are either exec or PclZip. In this article, we’ll go over the differences, pros, and cons of using these ZIP utility tools.
Exec is a PHP function that Solid Backups will first attempt to perform the zipping operation with on your backup, as this is the most reliable function due to the fact it’s interacting directly with your servers CLI. You can check if this function is available by checking your PHP configuration, or navigating to Solid Backups -> Server Tools -> Server and see if the function is disabled within the “Disabled PHP functions” option. If it’s not disabled, then your server can use exec.
Exec will allow Solid Backups to run zip commands directly in your server’s command line, which provides a more efficient solution. This is due to the fact that the server tends to run commands much faster than an external ZIP utility tool such as PclZip. The exec function is acceptable to use on all servers that use a Unix based system. With exec, there are practically no limits to how large your ZIP archive size can be due to the server’s ability to handle large archives.
Exec is a hit or miss when it comes to most servers, as many hosting providers will disable the function for security reasons. However, this all depends on the plugin using the exec function and plugins such as Solid Backups properly handle the function and makes sure no arbitrary code is executed.
The ZipArchive is the second ZIP method Solid Backups will attempt to use if exec is not available on the server, as it provides an approach similar to how exec operates. This is a built-in class within PHP, so it’s available as long as the ZIP extension is installed within your version of PHP.
ZipArchive works very similar to how exec works, as it interacts with your server to perform several ZIP operations. ZipArchive practically has no limits to how large the ZIP archive size can be and the flexibility of the class can provide better performance.
If exec is disabled on the site, then more than likely ZipArchive is also not available on the server. This is due to the fact that the ZipArchive class behaves similar to how exec does, so shared hosting providers will typically disable this as well if they decide exec is insecure.
PclZip is the ZIP utility tool Solid Backups will use as a last resort. This ZIP utility uses PHP’s library in order to perform different types of zip operations, so it will still zip your backup similar to how any other ZIP utility would. WordPress Core adds this class by default on every installation and is located in the wp-admin directory.
Since the PclZip class comes in every WordPress installation, then most if not all sites will have the ability to use PclZip to perform ZIP operations. The PclZip class is more widely used among most shared hosting providers, as its limitations ensure the ZIP archive size doesn’t exceed the servers threshold.
Due to PclZip’s limitations – it can only handle a maximum ZIP archive size of 4GB and/or less than 64k files/directories to be added to the ZIP archive. This affects sites that have quite a bit of media on the site, as media takes up quite a bit of space on most WordPress sites. In this scenario, you’d need to create a backup profile if the site exceeds 4GB or use the Site Size Maps tool to slim down your site to under 4GB.