"Let's Hack!" Workshop Laravel Forge Recipes
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
# Tweak Services | |
sed -i 's/display_errors = On/display_errors = Off/g' /etc/php/7.4/fpm/php.ini | |
service php7.4-fpm restart | |
# Install wp-cli | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
php wp-cli.phar --info | |
chmod +x wp-cli.phar | |
mv wp-cli.phar /usr/local/bin/wp |
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
# Prepare | |
cd $HOSTNAME.evilhacker.dev | |
rm index.html | |
# Install WP | |
wp core download | |
wp config create --dbname=letshack --dbuser=letshack --dbpass=superSecretDBPassword | |
wp core install --url="https://$HOSTNAME.evilhacker.dev" --title="Let's Hack" --admin_user=valorin --admin_password=myLetsHackPassword --admin_email=stephen@rees-carter.net | |
# Options | |
wp user update valorin --display_name=Stephen | |
wp option update blogdescription "WordSesh 2021 Workshop" | |
wp option update permalink_structure "/%postname%/" | |
# Copy manual plugin | |
touch /home/letshack/letshack.log | |
wget https://gist.githubusercontent.com/valorin/e3924234976a767d586d6c065965552f/raw/c8b83c3c523e03b2eef1311d632a06f298ad8f1c/letshack.php -O /home/letshack/letshack.evilhacker.dev/wp-content/plugins/letshack.php | |
# Install Plugins | |
wp plugin activate letshack | |
wp plugin install --activate wordfence-login-security | |
wp plugin install --activate wps-hide-login --version=1.5.2 | |
wp plugin install --activate wp-pagebuilder --version=1.2.3 | |
wp plugin install --activate wp-central --version=1.4.7 | |
# Add dummy posts | |
wp post generate --count=2000 --post_author=1 --post_date=2021-05-01-00-00-00 | |
# Setup Bluey user | |
wp user create bluey bluey@evilhacker.dev --user_pass=dragon --role=contributor | |
wp post create --post_author=2 --post_content="Greetings WordSesh 2021! This is my first ever post. I'm so excited to be here." --post_title="Greetings WordSesh!" --post_status=publish |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment