Skip to content

Instantly share code, notes, and snippets.

@Arsintorabi
Arsintorabi / install.php
Created November 29, 2017 12:52 — forked from tschoffelen/install.php
A simple PHP script that automatically downloads and unzips the latest version of Wordpress in the current directory (./), so that I don't have to download it and upload it to my server through FTP manually.
<?php
echo '<pre>';
echo '<span style="color:blue">DOWNLOADING...</span>'.PHP_EOL;
// Download file
file_put_contents('wp.zip', file_get_contents('http://wordpress.org/latest.zip'));
$zip = new ZipArchive();
$res = $zip->open('wp.zip');
if ($res === TRUE) {