I've had problems on and off with executing this task, using D7.

I create sites on localhost , then I ftp the files to live server.

FTPing the whole sites folder doesn't work, sometimes causes errors, how should I upload the sites folder properly?

So what I have done is upload the sites/all and sites/default/files separately, and I take out the .htacess file from the sites/default/files folder and keep the original one in there...

But that's a pain in the ass, shouldn't it simply be delete the complete sites folder on the server and FTP the one from locahost?


Instead of using FTP, consider using Git over SSH. Drupal.org has documentation on using Git with Drupal 6, 7, and 8. Note that for this, your webhost will need to support SSH, which some of the cheapest do not.

If you're using Drupal 8, consider using Git with Composer.

If you need some help figuring out how all this works, consider making a test site and a free account on one of the Drupal-dedicated hosts like Pantheon or Acquia. (Disclaimer: I have sites on Pantheon, but here I'm just recommending trying a free account to see how the Git flow works.)

  • My questions is how to set up the upload folder, the files structure, not the method to upload;) – Bruno Vincent Oct 15 '17 at 8:32
  • @BrunoVincent Drupal sets up the structure. If you're talking specifically about the files directory within Drupal, you configure that within the UI. In any case, FTP is a slow, painful method, use git for code and rsync for the files directory if you want to stop struggling. – Patrick Kenny Oct 15 '17 at 8:35
  • Thanks Patrick, I use Cpanel FTP and it takes less than a minute, maybe I'm not being clear....when I overwrite the whole sites folder, it doesn't work, so I need to upload files AND all directories separately, and additionally in the files folder, I need to take out the .htacess file and re-introduce it manually, it's tedious, I wish I could simply FTP the whole sites folder, am I missing something here? – Bruno Vincent Oct 15 '17 at 8:45
  • @BrunoVincent I don't know what you mean by "it doesn't work"; if your local dev is configured to be like production, it should work. If not, you should reconfigure your local dev/whatever software you are using to do the FTP. What you're doing (uploading directories separately, re-creating .htaccess) is definitely not a standard approach. As mentioned in Binny's answer, when you're using rsync, usually it's just one command on the directory and poof, everything's done. – Patrick Kenny Oct 15 '17 at 8:48

I personally prefer rsync for transferring files other than code between local and live servers or between the servers themselves. the advantage is that rsync checks if the file already exists and does not repeat the transfer if it exists.

Git is good if you are transferring code based files and it should be part of your development and deployment strategy for all code.

Not the answer you're looking for? Browse other questions tagged or ask your own question.