Skip to content

Instantly share code, notes, and snippets.

What would you like to do? one click install
// 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()) {
shell_exec("curl -O");
shell_exec("tar -xzf bolt-latest.tar.gz --strip-components=1");
shell_exec("chmod -R 777 files/ app/database/ app/cache/ app/config/ theme/ extensions/");
echo " was successfully installed";
} else {
echo "cURL is NOT installed on this server";
Copy link

zomars commented Apr 8, 2015

Useful for shared hosts, or simply when you don't have shell access. Also avoid large FTP transfers by uploading only your theme and config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment