This file contains hidden or 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
| #!/bin/bash | |
| if [ -d '../vhosts' ]; | |
| then | |
| echo "Updating all WordPress sites ... press Ctrl-C to stop." | |
| find . -maxdepth 1 -type d -exec update_wordpress {} \; | |
| else | |
| echo "This can only be run from the /var/www/vhosts folder" | |
| pwd | |
| fi |
This file contains hidden or 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
| #!/bin/bash | |
| cd $1 | |
| if [ -f 'wp-config.php' ] && [ -d 'wp-admin' ] && [ 'wp-includes' ]; | |
| then | |
| rm -rf ./wp-admin | |
| rm -rf ./wp-includes | |
| cp -rf /var/www/wordpress/* . | |
| git add -u |
This file contains hidden or 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
| function get_domain_name() { | |
| $server_name = $_SERVER["SERVER_NAME"]; | |
| $domain_name = explode('.', $server_name); | |
| $i = count($domain_name) - 1; | |
| $domain_name = implode('.',array($domain_name[$i - 1],$domain_name[$i])); | |
| return $domain_name; | |
| } |