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
| #Wordpress Sheet | |
| #For verifying Core wordpress files | |
| wp core verify-checksums | |
| #For restricting auto update of wordpress | |
| define( 'WP_AUTO_UPDATE_CORE', false ); | |
| #For increasing memory limit | |
| define('WP_MEMORY_LIMIT', '256M'); |
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
| #Magento Sheet: | |
| #For search and replace in database file of magento | |
| sed -i -e s'#DEFINER=`magento`@`%`#DEFINER=`cwdb`@`%`#'g file.sql | |
| #Difference between Magento 1 and 2 | |
| env.php Magento 2 | |
| local.xml for Magento 1 | |
| "Magento 2.x" |
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
| #Checking for the IP's Performing DDOS attack. | |
| netstat -ntu|awk '{print $5}'| cut -d: -f1 -s | sort| uniq -c| sort -nk1 -r | |
| #**********Compression and Decompression**********# | |
| #For compressing to tar.gz file | |
| tar czvf create.tar.gz /directory/to/be/compressed/ | |
| #For Extracting tar.gz file in specific directory | |
| tar -xzvf yourfile.tar.gz -C /extracting/directory |
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
| #MYSQL | |
| #—MySQL Slow / Running queries for all applications for last 1day | |
| for A in $(ls | awk '{print $NF}'); do echo $A && sudo apm mysql -s $A -l 1d; done | |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| ## — MySQL Slow / Running queries of specific app for last 1h: | |
| sudo apm mysql -s dcncgptpek -l 1h |
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
| #OS-GreymonSheet | |
| #For switching to Master user | |
| for user in $(cat /etc/passwd | grep master | awk -F : '{print $1}'); do su $user; done | |
| #For Finding application with corresponging domain name | |
| grep -lr "domain.com" */conf/* | |
| #For checking apache logs of every application in Cloudways |