Skip to content

Instantly share code, notes, and snippets.

View jessengatai's full-sized avatar

Jesse Ngatai jessengatai

View GitHub Profile
@jessengatai
jessengatai / install.php
Created November 29, 2016 23:26 — 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) {