Skip to content

Instantly share code, notes, and snippets.

@zomars
Created April 8, 2015 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zomars/8d2387bd4e3f2463d141 to your computer and use it in GitHub Desktop.
Save zomars/8d2387bd4e3f2463d141 to your computer and use it in GitHub Desktop.
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