Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bolt.cm one click install
<?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()) {
shell_exec("curl -O http://bolt.cm/distribution/bolt-latest.tar.gz");
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 "Bolt.cm was successfully installed";
} else {
echo "cURL is NOT installed on this server";
}
?>
@zomars
Copy link
Author

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