Skip to content

Instantly share code, notes, and snippets.

@zomars
Created April 21, 2015 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zomars/6f94bcd8528ff1b82ea8 to your computer and use it in GitHub Desktop.
Save zomars/6f94bcd8528ff1b82ea8 to your computer and use it in GitHub Desktop.
wordpress-install.php
<?php
// Script to install the latest version of Bolt.cm CMS
// Define function to test if curl is installed on the server
function _is_curl_installed() {
if (in_array ('curl', get_loaded_extensions())) {
return true;
} else {
return false;
}
}
// Ouput text to user based on test
if (_is_curl_installed()) {
echo 'Downloading Lastest Wordpress Package\n';
shell_exec("wget -N http://wordpress.org/latest.tar.gz");
echo 'Extracting Wordpress Package\n';
shell_exec("tar -xzvf latest.tar.gz --strip-components=1");
echo 'All Done!\n';
} else {
echo "cURL is NOT installed on this server";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment