This file contains 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 -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
# Gathering database login credentials from user input | |
read -p "Database Host: " dbhost | |
read -p "Database Name: " dbname | |
read -p "Database User: " dbuser |
This file contains 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
<?php | |
//Scripts(em WP-CLI) para automação de criar ou deletar rapidamente sites em Wordpress em localhost. | |
//Crie um arquivo php: | |
//Confere se WP-CLI está disponível e se sim adiciona 'installer' aos comandos do qual há 2 subcomandos :install e uninstall | |
if ( defined( 'WP_CLI' ) && WP_CLI ) { | |
WP_CLI::add_command( 'installer', ‘WP_CLI_Installer’, array( ‘when’ => ‘before_wp_load’ ); | |
} | |
/** |
This file contains 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 | |
# https://deb.sury.org/ | |
VERSION=$1 | |
# unmount all php apache modules | |
for version in $(ls /etc/php); do | |
sudo a2dismod php$version | |
done |
This file contains 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 | |
# apt-get install webp | |
for f in *.webp | |
do dwebp $f -o "$f.png" | |
done; |
This file contains 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
wp post update $(wp post list --post_type='page' --post_status='publish' --format=ids) --post_status='publish' --defer-term-counting |
This file contains 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
#!/usr/bin/env bash | |
if [[ $1 ]]; | |
then | |
php -r " echo var_dump(unserialize('"$1"')); echo \"\\n\";" | |
else | |
STRING=`pbpaste` | |
php -r " echo var_dump(unserialize('"$STRING"')); echo \"\\n\";" | |
fi |
This file contains 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 -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |