Sublime Forum

Sublime Text 4: Can't upload File to Server SFTP after Editing Connecting to example.com

#1

I am brand new to Sublime Text and have purchased version 4. All of my local files were synced with my server before installing Sublime Text. I got started with setting up SFTP by referring to this document.
I have tried both topics, “Editing files on the server with Sublime” and “Publishing files to the server with Sublime”.

“Publishing files to the server with Sublime” is what I finally went with.

From the left navigator in Sublime Text I can right click public_html folder and create new folder, then right click the new folder and choose upload folder and it works great. The same is true for new files I create.

The problem is, if I right click on a file or folder that already existed prior to installing Sublime Text and choose upload folder or file SFTP tries to upload to the server “example.com” instead of the server specified in the “sftp-config.json” file. The “sftp-config.json” file is located on my local computer in “E:\Documents\Dreamweaver_Sites\Streamhoster_New”.
There is also a file located in C:\Users\Larry\AppData\Roaming\Sublime Text\Packages\User\sftp_servers\streamhoster_new.json with my server mapping.
I don’t see any Sublime Text config file on my server anywhere, maybe that’s normal?

I have tested on 2 computers one running Windows 10 and the other running Windows 11.

Not knowing anything about the internal makeup of Sublime Text, I will also ask these questions.
Is there a database that is created by Sublime Text to track changes and mappings?
If so, does that mean I should sync from server to local folder with an empty local folder that would allow the database to be populated. Remember all of my files existed in the target folder before I installed Sublime Text.

Please help

0 Likes

#2

I FINALLY SOLVED THE PROBLEM!
After all of my playing around trying to get things to work, I had arbitrarily created 2 sftp-config.json files on the local computer (how stupid is that?).
One was located at “/” root and the other in a sub-folder of public_html. It just so happened that the folder I was trying to upload and download files from was the same folder with the bogus copy of sftp-config.json file. I opened the bogus file and sure enough the server name was example.com. I deleted the bogus file and everything appears to work now. Lesson learned, always clean up behind yourself when saving the sftp-config.json file to the wrong folder.

1 Like

#3

kudos for actually coming back and furnishing the answer!

1 Like