10
Codazed
6y

I once accidentally deleted the live versions of my websites instead of the development versions (which I wanted to delete because I was going to start over from the live versions.) After several hours of digging through backup folders, I finally found the latest backup files, which were a few months old.

It took me a few hours to get the backed up versions to the same version they were when they were live. In all this, I have learned to keep the live and development versions of my sites in completely different locations.

Comments
  • 2
    Git.....
  • 2
    @ScribeOfGoD The last time I used git to manage my websites, the cache would get all fked up every time I would pull the file changes from the git repository.
  • 0
    @BaconatorNoVeg the browser cache? 🤔
  • 3
    @ScribeOfGoD I started to write a reply, then it hit me. Does Cloudflare cache website files?
  • 0
    @BaconatorNoVeg mmhhmm
  • 3
    @ScribeOfGoD That may have been the problem then 😒
  • 0
    @BaconatorNoVeg Please read the section mentioning the "Cache-Control" header and "s-maxage" of this article:

    https://support.cloudflare.com/hc/...-

    and re-gain your faith in this awesome service called Cloudflare.
  • 3
    @Meta I love Cloudflare. I just never knew I had the cache enabled.
  • 0
    @BaconatorNoVeg Cache is enabled by default as part of the DDoS mitigation process, its much easier for then to serve the files to the user than to act as a proxy all the time.
  • 1
    @BaconatorNoVeg I never faced this issue and I have been using git for last 8 years. Can you tell me more about this cache issue? I am asking because I believe that no dev should work without any version control system.
  • 2
    @creator So basically what would happen is I would pull changes to the web server from the git repository. Some files would update, and other files such as images and stylesheets would keep their cached versions. This would break my websites with major, undesirable results. What I didn't realize was my websites were being cached by Cloudflare. I will start using git again to vc these sites, but I will probably be purging the Cloudflare cache every time I pull an update.
  • 1
    @BaconatorNoVeg you should always use git 😦
  • 2
    @BaconatorNoVeg I don't think this is something related to Git. You may need a build system or CI/CD pipelines probably, but that would be an overkill for small projects.
    Better try gulp or even better, webpack.
    But always use Git (unless you're into mercurial)
  • 1
    You have Git right?
Add Comment