apache2ctl configtest - Configtest before restarting Apache.
service apache restart - Restart Apache.
service apache restart - Restart MySQL.
apache2ctl -M - List loaded Apache modules.
gem cleanup - Cleanup the gems.
gem cleanup -d - Dry-run the cleanup.
brew update - Update Homebrew without upgrading.
brew upgrade - Upgrade all casks.
tar -xzvf [filename] - Untar a file.
tar -zcvf folder.tar.gz [file/folder] - Tar a file/folder.
mysql -u username -p -h localhost - Login to MySQL.
Copyin' stuff.
scp -r [email protected]:/httpdocs/folder/* . - copy everything from the remote server to the current server.
rsync -av --files-from=files_to_transfer old/ new/ - Sync files from a list in a file.
Normalize file/folder permissions.
find /path/to/your/wordpress/install/ -type d -exec chmod 755 {} \;
find /path/to/your/wordpress/install/ -type f -exec chmod 644 {} \;
du -sh foldername - get the size of the folder in human-readable format.
sudo apachectl restart - Restart Apache.
sudo virtualhost.sh [hostname] - Create new virtualhost.
ufw enable and ufw disable - Enable and disable UFW
ufw show added - Show added configuration before running enable
wp search-replace 'https://olddomain.com' 'https://newdomain.com' --skip-columns=guid - search and replace old domain in the database. Add --dry-run to test. Add --url=SITE_URL to apply to a multidomain install.