Created
April 21, 2015 21:33
-
-
Save zomars/6f94bcd8528ff1b82ea8 to your computer and use it in GitHub Desktop.
wordpress-install.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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