Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Script to install the latest version of 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");
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