I
I
Igor Andryushchenko2014-01-12 16:21:54
git
Igor Andryushchenko, 2014-01-12 16:21:54

How to synchronize hosting and local server for easy editing?

So, the question is, are there programs like git, but only to help you create and edit a site?
I'm talking about having 2 copies of the site and database, on my computer and hosting, and when something changes, both versions are synchronized.
I edited the file, saved it and immediately updated the same file on the hosting. Same with db.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
E
Evgeny Kuznetsov, 2014-01-14
@Tvistar

I'm using dklab_realsync, I edit all the files locally, save them and while I go to the browser they are already on the server. Now I don’t even have a web server on the local, there is no hemorrhoids with database and file synchronization. What do you wish!

Y
Yuri Shikanov, 2014-01-12
@dizballanze

What you need is git.
You write code, push it, git-hook fires, which executes deploy to your server.
To synchronize the database, use migrations that are automatically applied when deployed on the server.

S
Sergey, 2014-01-12
Protko @Fesor

All popular IDEs have built-in mechanisms for synchronizing files on the server. You can also use the version control system (if, nevertheless, you update more than one file, but let's say ... finished a piece of work - updated it). You have already been told about migrations and the database.
In general, I don’t see the point in editing files on the server or in instant deployment when changing files.

V
Vladimir Prikhodko, 2014-01-12
@cska63

Also, let's say many IDEs support synchronization. The same PyCharm.

I
impyros.com, 2020-09-24
@impyros

- synchronize the local directory with the contents of the directory on the remote server:
rsync -aqxP --progress [email protected]:/tmp/test/ /home/user/test/
- synchronize the directory on the remote server with the contents of the local directory:
rsync -aqxP --progress /home/user/test/ [email protected]:/tmp/test/
- sync on a non-standard port via SSH:
rsync -e='ssh -p 44444' -aqxP /project /webelement/ hoster.ru:/project/webelement/
You can also use the switches -vz
-v- display detailed information about the copying process
-z- compress files before transfer
Full documentation on Rsync in Russian can be found on the site: wiki.opennet .ru/Rsync

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question