Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Get information from the wp-config.php file in order to make a backup copy
- sqluser=( $(grep "DB_USER" wp-config.php | sed -r -e "s/^[^']+'.*', '([^']+)'.*/\1/") )
- sqlpass=( $(grep "DB_PASSWORD" wp-config.php | sed -r -e "s/^[^']+'.*', '([^']+)'.*/\1/") )
- db_name=`grep "DB_NAME" wp-config.php | sed -r -e "s/^[^']+'.*', '([^']+)'.*/\1/"`
- db_host=`grep "DB_HOST" wp-config.php | sed -r -e "s/^[^']+'.*', '([^']+)'.*/\1/"`
- tb_prefix=( $(grep "table_prefix" wp-config.php | cut -d";" -f1 | cut -d"=" -f2 | sed -e "s|'||g" -e 's|"||g' -e "s|;||g" -e "s| ||g") )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement