Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

Sync localhost DB to remote host DB in wordpress

Jul 3, 2013 11:17PM PDT

Hello, I run a technology blog called as techcloud7.com. I am facing one issue these days. I want to sync localhost database to the remote host's so that every single time when I made any changes to my site I don't need to update my database manually (.. Remote host everytime) or another Wordpress site. Please, advise me any good online solution or plugin.

Note: This post was edited by a forum moderator to remove promotional link on 07/05/2013 at 12:57 PM PT

Discussion is locked

- Collapse -
Answer
Re: DB tp DB
Jul 4, 2013 12:24AM PDT
- Collapse -
reply
Jul 4, 2013 1:00AM PDT

I know that is replica but i don't want this see


I develop Wordpress sites, and I have a local xampp server I use when developing locally and then I sync my changes to the remote server. To sync the database I have to export from my local PHPMyAdmin and then import to the remote PHPMyAdmin.same for every time (i have shared hosting)

- Collapse -
Wordpress sync script
Dec 16, 2013 3:50AM PST
- Collapse -
Actually, you synchronize
Dec 16, 2013 3:38PM PST

files and database with just a few lines of code:

rsync --archive --verbose --delete --delete-excluded "$src" "$dst"
mysqldump --verbose --host=$host --user=$user --password $db > "$dst/$db.sql"
mysql --user=$user --password=$pass $db < "$src/$db.sql"

Nothing complicated about it.

~Sovereign