---
title: "Discussion on \"🎯How to transfer database  from one server to another of WordPress site with script.🚀\" | Hashnode"
description: "Discussion on \"🎯How to transfer database  from one server to another of WordPress site with script.🚀\". STEP 1:\nScript.sh  \n#!/bin/bash\n#Database credentials\nDB_NAME=''DB_USER=''DB_PASSWORD=''DB_HOST='localhost'\n#Backup file name with date\nBACKUP_FILE=\"${DB_NAME}$(date +'%Y%m%d%H%M%S').sql\"\n#Perform the database dump\nmysqldump --user=$DB_USER --passwor..."
url: "https://hashnode.com/posts/how-to-transfer-database-from-one-server-to-another-of-wordpress-site-with-script/676d12c6bc845851fa11df8b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [🎯How to transfer database from one server to another of WordPress site with script.🚀](https://biren.hashnode.dev/how-to-transfer-database-from-one-server-to-another-of-wordpress-site-with-script?utm_source=hashnode&utm_medium=feed)

STEP 1: Script.sh #!/bin/bash #Database credentials DB\_NAME=''DB\_USER=''DB\_PASSWORD=''DB\_HOST='localhost' #Backup file name with date BACKUP\_FILE="${DB\_NAME}$(date +'%Y%m%d%H%M%S').sql" #Perform the database dump mysqldump --user=$DB\_USER --passwor...

Dec 26, 2024 · 1 min read · biren.hashnode.dev  
Read the article

-   [#wordpress](https://hashnode.com/tag/wordpress)
-   [#databases](https://hashnode.com/tag/databases)
-   [#database](https://hashnode.com/tag/database)
-   [#php](https://hashnode.com/tag/php)
-   [#linux-ubuntu-aws-devops-automation](https://hashnode.com/tag/linux-ubuntu-aws-devops-automation)
-   [#migrate](https://hashnode.com/tag/migrate)

## Written by

[Birendra Kumar Chaudhary](https://hashnode.com/@birendra353)

@birendra353 · Nepal, kathmandu

  
[View profile](https://hashnode.com/@birendra353)

system and cloud administrator at Appharu PVT. LTD

🌐 DevOps Enthusiast | Cloud &amp; System Administrator | WordPress Expert With 2+ years of experience, I specialize in cloud infrastructure, server management, and WordPress development. At Appharu PVT. LTD., I optimize systems, reduce costs, and implement monitoring solutions. Experienced in deploying 50+ WordPress sites, AWS S3 integration, and troubleshooting technical issues, I’m focused on performance, security, and continuous learning in DevOps and automation.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
