Connecting a local editor to a live server feels efficient. You open the project, change a file, save, and the site updates. It also removes most of the friction that protects production from a tired afternoon mistake. The goal is not to avoid remote access. It is to use it without making the live site the only copy of anything.

This guide covers a safe setup for a Hostinger account: verifying what your plan supports, connecting with SSH keys, using VS Code Remote SSH for inspection, and deploying through a reviewed commit rather than editing live files by hand.

1. Confirm what your plan actually supports

Before you install an extension or generate a key, log in to hPanel and check the features for the specific website or plan. The relevant sections are usually under Advanced or Website for SSH access, Git, cron jobs and Node.js. Availability differs between shared hosting, cloud hosting, VPS and managed WordPress.

  • Is SSH enabled for this account, and what host, port and username are shown?
  • Does the plan support the runtime your application needs, including the required Node.js or PHP version?
  • Is there a Git deployment feature, or will you deploy with a script or CI workflow?
  • What is the exact application root for this site? Do not guess.
  • Can you create a staging site or a separate test environment?
  • Where are backups stored, and how do you restore one?

Write the answers down. A deployment process built on assumptions about the plan is a process that fails at the worst possible moment.

Choose by workload

Compare the limits that matter to your project

These are decision prompts, not a live plan or price comparison. Product names, resources, and included features vary; verify the current details for your region before purchasing.

One small site

A portfolio, brochure site, or first blog.

  • One-site limit
  • Included backups
  • Domain eligibility

Business site or store

A company site with forms, products, or steady growth.

  • Resource limits
  • Backup frequency
  • Staging and support

App or higher demand

A project with custom runtime or stronger resource needs.

  • Runtime availability
  • CPU and memory limits
  • Scaling options
Check current plans and terms

2. Use SSH keys, not passwords

Generate a dedicated key pair for the workstation. On macOS or Linux, the command is straightforward. On Windows, use the OpenSSH client that ships with modern Windows or Git Bash. Do not reuse your personal GitHub key for a hosting account if you can avoid it.

bash
ssh-keygen -t ed25519 -C "workstation-hostinger" -f ~/.ssh/hostinger_ed25519

# Copy the public key only
cat ~/.ssh/hostinger_ed25519.pub

Add the public key in hPanel under the SSH access section for your account. Keep the private key on your machine and never paste it into a chat, a ticket, a repository or a screenshot. If the key is exposed, revoke it and generate a new pair.

3. Configure VS Code Remote - SSH

Install Microsoft's Remote - SSH extension from the VS Code marketplace. Then add a host entry to your SSH config. The values below are placeholders; copy the real host, port and username from your own hPanel.

Connect, confirm the directory with pwd, then inspect. The sample values are placeholders, not Hostinger defaults.Digi Aerotech illustrationView full size
ssh-config
Host my-hostinger-account
    HostName hosting.example.net
    Port 65002
    User account-user
    IdentityFile ~/.ssh/hostinger_ed25519
    IdentitiesOnly yes
    ServerAliveInterval 30

The port 65002 shown above is a common example on some shared Hostinger accounts, but it is not universal. Use the port in your panel. The same applies to the hostname. If the connection fails, read the exact error before changing settings.

  1. 01

    Connect from a terminal first

    Run ssh my-hostinger-account and confirm the host key fingerprint before accepting it.

  2. 02

    Verify the account and directory

    Run whoami and pwd. Confirm you are in the intended application root, not another site on the same account.

  3. 03

    Inspect before editing

    List the files, check the runtime version and read the deployment notes. Do not open .env files in a shared screen.

  4. 04

    Connect VS Code

    Use Remote-SSH: Connect to Host and open the application folder. Keep the terminal visible.

A read-only first session catches most path and permission mistakes.

4. Make Git the source of truth

The safest deployment is one where the live site is built from a commit you can identify. The exact mechanism depends on the plan: a provider Git integration, a CI workflow, or a script that pulls a specific branch. The principle is the same: no untracked edits on production.

  • Keep the production branch protected and review changes before merging.
  • Tag or record the commit that is live. “The latest main” is not a version.
  • Build and test locally or in staging before deploying.
  • Run database migrations as a separate, reviewed step with a backup.
  • Keep environment variables in the host's environment settings, not in the repository.
  • Know how to redeploy the previous known-good commit.
WorkflowManual SFTP uploadGood forStatic sites and emergency fixesWatch out forEasy to upload a partial or wrong file
WorkflowGit pull on serverGood forSimple Node or PHP appsWatch out forRequires SSH, build tools and a clean working tree
WorkflowProvider Git integrationGood forManaged deploymentsWatch out forCheck branch, build command and deploy directory
WorkflowCI pipeline (GitHub Actions)Good forRepeatable builds and testsWatch out forSecrets management and runner access
WorkflowVS Code Remote SSH editGood forInspection and debuggingWatch out forNot a deployment process; changes bypass review
Choose one primary workflow and make the others exceptions with a written reason.

5. Deploying a Node.js or Next.js app

A Node application needs more than file upload. It needs a supported runtime, a build step, environment variables, a start command and a process manager or application server. Shared hosting may support Node.js through a managed application feature, but not every framework or configuration. Verify before you build the workflow around it.

  1. 01

    Match the runtime

    Check the Node version in the panel against your package.json engines and dependencies.

  2. 02

    Install reproducibly

    Use npm ci or the equivalent lockfile command. Do not rely on a global package that happens to be installed.

  3. 03

    Build in the right environment

    Set production environment variables before the build if the framework reads them at build time.

  4. 04

    Start the app correctly

    Use the start command and port expected by the host. Confirm the application server is running, not just the build.

  5. 05

    Check logs and health

    Open the homepage, a dynamic route, the sitemap and a form. Read the runtime log for warnings.

  6. 06

    Restart cleanly

    Use the host's documented restart mechanism. Do not kill processes you do not understand.

A successful build is not a successful deployment. Verify the running app.

For Next.js, confirm whether the host supports the output mode you are using. A standalone build, a static export and a server-rendered app have different requirements. If the plan only supports static files, a server-rendered app will not work no matter how the files are uploaded.

6. Environment variables and secrets

Keep production secrets in the hosting control panel or the CI provider's secret store. Use separate values for local, staging and production. Rotate any credential that has been committed, pasted into a ticket or shared in a screenshot.

  • Never commit .env, .env.local or database dumps.
  • Use least-privilege database users for the application.
  • Restrict admin panels and SSH by IP where the host supports it.
  • Enable two-factor authentication on the hosting account and the registrar.
  • Keep an offline record of recovery codes.
  • Remove access for former employees and agencies promptly.

7. Backups, migrations and rollback

Before a production change, take a backup you can restore. For a database-backed site, that means both the files and the database. Test the restore process on a staging copy if you have never done it. An untested backup is a hope, not a recovery plan.

  1. 01

    Back up

    Files, database and environment configuration. Store the backup outside the server.

  2. 02

    Migrate

    Run schema changes in a transaction where possible. Keep the migration idempotent.

  3. 03

    Deploy

    Deploy the known commit and run the build. Record the release.

  4. 04

    Verify

    Check the homepage, a key article, a form, the sitemap and the admin login.

  5. 05

    Roll back if needed

    Restore the previous release and database state. Do not improvise under pressure.

A rollback plan is part of the deployment, not an emergency improvisation.

8. Common connection problems

SymptomPermission denied (publickey)Likely causeKey not installed or wrong userWhat to checkPublic key in hPanel, username, file permissions
SymptomConnection timed outLikely causeWrong host or port, or network blockWhat to checkPanel values, firewall, VPN
SymptomHost key verification failedLikely causeServer changed or wrong hostWhat to checkVerify with the provider; do not disable checks blindly
SymptomNode command not foundLikely causeRuntime not in PATH for non-interactive shellWhat to checkUse the full path or the host's documented environment
SymptomBuild fails on serverLikely causeMissing dev dependency or memory limitWhat to checkInstall with lockfile, check logs, build locally
SymptomApp starts then stopsLikely causeWrong start command or portWhat to checkRuntime logs and host documentation
Read the error before changing three things at once.

VS Code Remote SSH is a convenience, not a substitute for a deployment process. The safest workflow is still: change locally, review the diff, test, commit, deploy the commit, verify, and keep a rollback ready. The server should be a place where code arrives, not a place where code is invented.

Optional assistance

Need help with your setup?

Ask our team about setup support and mention code DIGIAEROTECH20. Available help and response times are confirmed case by case; no audit or service is guaranteed by this article.

Ask about setup support

If the only copy of a change is on the production server, it is not deployed. It is at risk.

Digi Aerotech engineering team