Exclude folders from sync (no .git or cache folders)

When using “Sync > Push to Kinsta” the local .git folder is also uploaded to the staging site. That folder is huge in some projects and should not be uploaded for several reasons

1 Like

I just had some issues on my staging site, because of another unexpected sync behavior:

After pushing changes from local to stage, I had many local-URLs in the website source. After quick debugging, I found that the entire cache files (generated by a plugin) were uploaded by the sync process - those files obviously contain wrong URLs.

Also, on my local site, I have two debugging plugins that I do not want to push to the hosting environment.

My suggestions:

  1. Either give us an option to define folders that should not be synced -OR- do not sync any folder that ends in “cache” or starts with “.git” -OR- check if a .gitignore file exists at the local website root and only sync files that are not ignored

  2. After syncing, do a “wp_cache_flush()” call on the updated website.