I’ve been battling ftp-simple for hours now and I was hoping somebody might have a solution.
I have a fresh install of VS Code
I created a folder for my projects called Projects
I have a project in that folder call it Website App
In Website App I created the .vscode folder
In the .vscode folder I created the ftp-simple.json:
{
"remote-workspace": [
{
"name": "Website App",
"host": "giowm1136.siteground.biz",
"port": 21,
"type": "ftp",
"username": "[email protected]",
"password": "***",
"path": "/public_html/wp-content/themes/astra-child",
"autosave": true,
"encoding": "utf8",
"protocol": "ftp",
"passive": true
}
]
}
Everything should be ready to go here. I have logged in with these credentials in FileZilla, so I know they work.
The problem is when I try and go to ftp-simple: FTP Config Settings I get a pop up error that says: Command ‘ftp-simple: Config – FTP connection setting’ resulting in an error. Cannot read properties of undefined (reading ‘0’)
The Output window when I select ftp-simple from the dropdown says this:
[2024-09-10 13:34:25] REMOTE_WORKSPACE_PATH = c:/Users/***/AppData/Roaming/Code/User/globalStorage/humy2833.ftp-simple/remote-workspace-temp
I don’t know if this is a VS Code issue or ftp-simple issue, but I’m pretty much out of ideas and I don’t think ftp-simple has any support, seeing as it hasn’t been updated in years.
I just want to have a connection to my wordpress files (functions.php and the ones I’ve created) so I can update them in real time in VS Code.
2
Answers
I had the same problem today, I was able to solve it by creating an empty ftp-simple.json file in the
~/.config/Code/User/
directory (this is using Linux, I guess Windows has the same style configuration folders), this generated thehumy2833.ftp-simple
folder with the sample files automatically inside globalStorage. I had to close and open the VSCode after creating the file for it to take effect. After that I did control+p to access the menu and accessed the option “ftp-simple: Config – FTP connection string” and the error stopped appearing when I wanted to create the configuration file.I hope you find it useful
UPDATE: this only let open the configuration file with the VSCode without the error, but when is saved the content of the file is wiped out, i’m trying to figure out how to solve this, if i have any advance i will update again
Looks like I was able to solve it by installing an older version of VS Code (ver 1.92.2). Here is the page where it provides more details and the link to the older version of vs code github.com/humy2833/FTP-Simple/issues/322