Created
January 10, 2025 07:55
-
-
Save eduard-un/a96106fa8a87d1ad8b8acfb3e1f799b8 to your computer and use it in GitHub Desktop.
WordPress Local installation reset
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
#!/bin/bash | |
# Step 1: Reset the database | |
wp db reset --yes | |
# Step 2: Install WordPress with the given details | |
wp core install --url="http://d5.test" --title="Divi 5" --admin_user="eduard" --admin_password="thesaint" --admin_email="[email protected]" | |
# Step 3: Clean up the installation by emptying all default content | |
wp site empty --yes | |
# Step 4: Import the DB | |
wp db import d5-2024-12-02-e070dd8.sql | |
echo "WordPress has been reset, installed, cleaned up and Site Logo has been set successfully." | |
#Step 5: Delete the et-cache folder | |
ET_CACHE_PATH="/Users/ed/Herd/d5/wp-content/et-cache" | |
if [ -d "$ET_CACHE_PATH" ]; then | |
rm -r "$ET_CACHE_PATH" | |
echo "The et-cache folder has been deleted successfully." | |
else | |
echo "The et-cache folder does not exist or was already removed." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment