unzip_file
unzip_file ( $file, $to )
Parameters:- (string) file Full path and filename of ZIP archive.
- (string) to Full path on the filesystem to extract archive to.
Returns:- (true|WP_Error) True on success, WP_Error on failure.
Defined at: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Unzips a specified ZIP file to a location on the filesystem via the WordPress
Filesystem Abstraction.Assumes that WP_Filesystem() has already been called and set up. Does not extract
a root-level __MACOSX directory, if present.
Attempts to increase the PHP memory limit to 256M before uncompressing. However,
the most memory required shouldn't be much larger than the archive itself.