Possible to push to Staging without breaking media?

Hi all - basically the issue I’m having is that we are working on a new site build. I am making blocks / custom theme on a local build and pushing to staging. Others are editing pages and things on the Staging.

So when i push “Files” only to staging, that seems to include media. So constantly files and images are becoming corrupt.

In Devkinsta, you cant set any defaults for a push or exclude anything other than “Database” and “Files” other than using the dropdown and re-deselecting various folders every single push, which would be somewhat workable, if that interface didn’t take around 5~ minutes to show the file structure.

Just wondering if there’s a better way to do this. I guess just manually overwriting my old theme folder thru sftp with my with my latest one from local would probably be the ‘best’/fastest way. Or just waiting out the long load times and deselecting the same folders over and over every time I push.

Hi @alex_565! Thank you for posting your question on the Kinsta community forums.

I understand that when you are pushing the files from your site on DevKinsta to the staging environment in MyKinsta the media that was added by other users on the MyKinsta staging environment appears to become corrupted. When pushing all files from DevKinsta this is expected as the /wp-content/uploads folder from the DevKinsta site overwrites that location on the MyKinsta staging environment.

As you already mentioned, DevKinsta does support selective push, so deselecting /wp-content/uploads from the Files tree should keep your team’s media intact. But a five minute load on that file tree doesn’t sound normal, and I think we should look into this further. Would it be possible to please share the following information with us so we can investigate and see what could be causing the file tree to take this long to load?

Q: DevKinsta Version

Q: Docker Desktop Version

Q: OS Version

Q: Hardware specifications (CPU, RAM amount, SSD/HDD type)

This information will help us determine what could be causing the bottleneck when it comes to listing the file tree data.

The alternative to using DevKinsta’s file push function would be as you mentioned as well, connect via SFTP straight to staging and upload just /wp-content/themes/[your-theme]/. That never touches the WordPress media uploads, so the media stays safe. Staging has its own credentials under MyKinsta >> Sites >> sitename (staging) >> Info >> Primary SFTP/SSH user.

You may find more information about how to connect to the site via SFTP at the link below:

We look forward to hearing back from you!

@Andrew
Docker: 4.78 (new version is available i see)
Dev: 2.13.6
OS: Windows 11 25H2 (no pending windows updates)
Specs: 32gb RAM, Intel Core Ultra 7 165U, NVME SSD 512GB
The local files are 550-600mb and genuinely take 5+ minutes.

Also, just trying it now, it doesn’t actually let me push just the theme file anyways. See screenshot.

Just dragging and dropping files from my local source thru filezilla instead.

Hi @alex_565

Maybe there is just some delay before the “Push site” button becomes active. But it should allow you to manually select specific files or folders within the custom theme folder to be pushed to Staging.

But you are right, for now, you’ll have to deselect all other files and folders inside the same directory that you don’t want to include on the Push.

It only lets me select as little as the “wp-content” folder. Immediately after specifying smaller than that it goes gray. I had the same thought about waiting and let it sit for like ten minutes but it didnt become clickable again. Only immediately after clicking wp-content, and then immediately not after clicking anything deeper.

@Andrew

Hi @alex_565,

Thanks for your reply! I appreciate you brining this issue to our attention. I will let our development team know about this issue and see if a fix is possible.

For now however, if in addition to selecting the theme folder/files you also select a WordPress core related file such as even the index.php file does that activate the “Push site” button? If so, please try pushing that way to confirm if it works and pushes only the expected files without causing issues with the existing media on the MyKinsta staging site.

We are also continuing to look into the performance issue you reported. We appreciate you sharing the details about your system/environment, that will help in our investigation. We will keep you updated!

That definitely sounds like a bug. If the button becomes inactive as soon as you go deeper than wp-content, I’d be hesitant to push anything until Kinsta confirms the workaround won’t affect media or other staging files.