Last active
August 4, 2022 20:44
-
-
Save trajche/bc2f70215a3c6e8dfb266f945c09708a to your computer and use it in GitHub Desktop.
Download and install WP in a Git directory
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 | |
if ! [[ -d ./wp-content ]] | |
then | |
echo "./wp-content doesn't exist in this directory. please make sure you are in a digitalnode wp instance." | |
exit | |
fi | |
if ! command -v wp &> /dev/null | |
then | |
echo "wp could not be found. please install wp-cli." | |
exit | |
fi | |
echo "Making tmp dir..." | |
mkdir ./dn-tmp | |
cd ./dn-tmp | |
wp core download | |
rsync -av --progress ./ ./../ --exclude wp-content | |
echo "Clearning up..." | |
rm -rf ./../dn-tmp | |
echo "Don't forget to make your own wp-config.php file and import/configure your database!" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment