HEX
Server: LiteSpeed
System: Linux premium283.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: citaqlmd (746)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/citaqlmd/.bash_history
echo "What website do we need to backup?"; read -r SITEFOLDER; echo "Selected site folder:$SITEFOLDER"; cd ~/"$SITEFOLDER"; echo "Great, let's start with the database. Please enter the database details."; DBUSER=$(grep "define( 'DB_USER', '.*' )" "$PWD"/wp-config.php | awk -F"'" '{print $4}'); echo " Your database username is: $DBUSER "; DBNAME=$(grep "define( 'DB_NAME', '.*' )" "$PWD"/wp-config.php | awk -F"'" '{print $4}'); echo " Your database name is : $DBNAME "; echo " Checking database password..."; DBPASS=$(grep "define( 'DB_PASSWORD', '.*' )" "$PWD"/wp-config.php | awk -F"'" '{print $4}'); echo "Backing up the database..."; mysqldump -u "$DBUSER" -p"$DBPASS" "$DBNAME" > "$PWD"/database.sql; echo "Backing up files..."; zip -r Files_and_Database.zip ~/"$SITEFOLDER"; echo "All done, please check."