Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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