Best way to edit files through FTP client and save a backup automatically - github

It is a habit that I have for editing files online . As far as I have many working websites and I don't want to backup all the files located on them but only those that I have edited through FTP client software .
What is the best way to have a version tracker for files ? Something like Github
I am not cool with editing files (websites) on localhost and move them to online mode. I am looking for a way to synchronize both local and web files in order to have the latest version of special files.

What about trying something like WinSCP or setting up XAMPP and working locally pushing to bitbuckket or github then once done working uploading all the files through FTP. WinSCP is for windows and allows you to edit the files without having to download them, edit them, reupload them. It allows you to edit them while they are live. However, XAMPP way is a better way to go if you plan to work on other peoples websites at any point in time.

Related

How to automatically-selectively backup critical files on edit?

I have just accidentally deleted one week of coding source files, and even testdisk does not restore them. Even executable jars gone... I use ubuntu. I dont want that happen ever again. How to sufficiently and efficiently make automatic backups (clones) of selected critical files to a different location e.g. home?
I use java, and eclipse as IDE, but this could be any file i work with. E.g. i select certain file, because i can accidentally delete it, so this lightweight backup tool would automatically update it in saved backup location according to saved changes. So if it is lost in working directory, as in my case, i can just take it from backup site on local machine. Pls help. I feel devastated...
cwatch might be a solution i am looking for, but it is too complicated.
p.s. i am aware of question Script to perform a local backup of files stored in Google drive
google services not ok for me.
The simplest solution would be to use GitHub or Bitbucket and to regularly push the changes you made to the online repository. You will benefit more from the usage of a version control software then from a local backup. You can use either of them for free.

How to get FTP-Simple working in Visual Studio Code?

I recently opted to start using Visual Studio Code. I want to connect to a remote server and edit files directly on the server. FTP-Simple seems like a great solution. But I am having a hard time understanding some basics about the program.
If I make a connection to a server, does FTP-Simple download all the actual files to my hard drive?
Also, I was able to make a connection, but in one of the directories there should be a sub-directory and it's missing. What am I doing wrong?
Can someone point me to some good documentation for this extension such as video(s), etc.
If I make a connection to a server, does FTP-Simple download all the
actual files to my hard drive?
Yes, It download all to your hard drive. you can find an address like below:
C:\Users\your user name\AppData\Roaming\Code\User\ftp-simple\remote-workspace-temp\cbc1ad9ed60f12ec861052806d7833db\httpdocs
for opening a directory in VSCode you can press F1 type ftp-config then click ftp-config:Open
and click on target directory you want to open for more information use this
2 years later and I'm having the same problem. I have already uninstalled ftp simple as well as VSC with no effect.
The plugin just doesn't download all the files on the FTP. It worked the first time I installed it for 2-3 weeks and then suddenly stopped being in sync with the FTP server.
There is a folder called "code" on mac in Library/Application Support where most of VSC data is saved, but deleting this didn't have an effect either. Perhaps it works for someone else, as this is apparently necessary to fully deinstall VSC.
I'd pay for good plugin that just allows to work remotely on ftp files!!

How to deploy my project to localhost?

I'm working on a website and right now I am using FileZilla to make changes to it. Every time I make a change, I have to re-upload the file to the website through FTP and then wait for it to update online. I want to just deploy my project to localhost so I can get instant results and then just upload the whole project when it's finished. How do I do this? All I have is a set of directories with the files in them.
You really need to use a web/application server such as IIS/Apache.
For PHP projects go for WampServer/XAMPP.Easy to setup and works very well.
(maybe too obvious)
If you are working only static content based on html/css/js you can just edit and view changes directly by opening the local file in your browser and refresh each time.
Furthermore for css and html you can edit your code "live", directly into browser and see changes immidiately.
Another option is to edit files with an editor that supports ftp like notepad++, you can connect via ftp, open and edit files directly from server (like php,html,css,js) because once you save the editor will automatically upload your changes.
Heres a good explanation about notepad++ and ftp plugin.
Localserver
If you work with php (and even only with html/css) the best choise is to run a local server that rappresents a real environment in which your code will run. As said by others XAMPP is a good choise for begginers because of simple installation and management.
XAMPP download
XAMPP tutorial
Once installed put your folder inside C:/xampp/htdocs/yourCodeFolder
Run the xampp control panel and start the Apache server.
Finally navigate with your browser to: http://localhost/yourCodeFolder/

Netbeans - Open remote folder/new project

I have been using Netbeans for several months now and like it a lot. I am trying to enable a way to create a project which accesses live files on my server to make changes. When I create a project using a remote source, it starts downloading all the server files to my computer. This would be just fine, except for the fact that (a) the server has a few gigs of files on it and (b) there are two of us that will be making changes on the server.
In the past, I have worked with IDEs that just open an FTP or SFTP connection and will download the file you want to edit, and then upload that file back to the server when you save it. Preferably, this is what I would like Netbeans to do.
I have tried adding a FTP folder in Windows, but Netbeans won't open it. I have tried using Swish and setting up an SFTP folder, and Netbeans won't find the Swish folder altogether.
On a side note, I understand what I am doing is horrible practice, but it is a small site and I am usually the only one working on it. I haven't worked on the website in the past several weeks and just thought it would be easier to get access directly than re-downloading the entire server's worth of code/images/videos/etc. Any help would be appreciated.
NetBeans does not support what you want to do. However, if you put your site under Subversion/Git (revision control), you could check out the content, modify it locally and push modification back remotely.
This would also help avoiding code clashes when your friends work on your website too.
Actually Netbeans supports this for php projects.
Just choose :
PHP Application from remote server
(but git is the best solution anw as it gives you version control as well but the above is useful if you want your server files to be updated when you just press ctr+s)

Synchronizing with live server via FTP - how to FTP to different folder then copy changes

I'm trying to think of a good solution for automating the deployment of my .NET website to the live server via FTP.
The problem with using a simple FTP deployment tool is that FTPing the files takes some time. If I FTP directly into the website application's folder, the website has to be taken down whilst I wait for the files to all be transferred. What I do instead is manually FTP to a seperate folder, then once the transfer is completed, manually copy and paste the files into the real website folder.
To automate this process I am faced with a number of challenges:
I don't want to FTP all the files - I only want to FTP those files that have been modified since the last deployment. So I need a program that can manage this.
The files should be FTPed to a seperate directory, then copy+pasted into the correct destination onces complete.
Correct security permissions need to be retained on the directories. If a directory is copied over, I need to be sure that the permissions will be retained (this could probably be solved by rerunning a script that applies the correct permissions).
So basically I think that the tool that I'm looking for would do a FTP sync via a temporary directory.
Are there any tools that can manage these requirements in a reliable way?
I would prefer to use rsync for this purpose. But seems you are using windows OS here, some more effort is needed, cygwin stuff or something alike.