cPanel, VS Code remote development is not supported on cPanel
Visual Studio Code Remote Development is not supported on cPanel. This does not mean that you cannot try to use it, only that you may run into trouble and we won't be able to assist with that beyond the information provided here. This is because there is a known issue in VS Code that it creates many processes and fails to correctly close them. It is common for VS Code users to reach their process limit on cPanel, which will not only impact use of VS Code, but will also stop your hosted website from displaying to visitors. You can mitigate this issue somewhat by manually cleaning up your processes after use of VS Code.
Viewing and cleaning up your processes
You will need to use either the "Terminal" feature from the cPanel dashboard, or the ssh client of your choice to kill your running processes
- Open Terminal or an SSH session to your cPanel account
- List your processes by running the following command
[accountname@web ~]$ ps -aux
Review your output which will look similar to the output below
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
accountname 335388 0.0 0.0 860080 17124 ? Sl Oct31 0:04 /home/accountname/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/no
accountname 410590 0.0 0.1 1006364 82332 ? Sl Oct31 0:25 /home/accountname/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/no
accountname 485218 0.0 0.0 860336 17208 ? Sl Oct31 0:03 /home/accountname/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/no
accountname 541750 0.0 0.0 204888 4812 ? Sl Oct31 0:00 /home/accountname/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/no
accountname 1529251 0.0 0.0 9564 1316 ? S Oct29 0:00 sh /home/accountname/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc
accountname 1529263 0.0 0.1 1000556 85928 ? Sl Oct29 1:16 /home/accountname/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/no-
Note the several lines with .vscode-server in the command
- Kill any processes you are not currently using by issuing the kill command with the argument of the PID of the process you would like to kill, for example
[accountname@web ~]$ kill 335388
Alternatives to using VSCode Remote Development
You can have some of the benefits of the VSCode development environment without enabling remote development. Simply use VSCode to write your code, then manually upload your code to cPanel using a supported protocol such as:
- git push - Using Git source control in VS Code, cPanel, git integration with cPanel
- scp - Command line and graphical clients available for Windows, Mac, and Linux workstations
- rsync - rsync documentation
- cPanel File Manager - cPanel, working with files in your cPanel site