# Deploy Sage via FTP

**URL:** https://discourse.roots.io/t/deploy-sage-via-ftp/22632
**Category:** sage
**Tags:** deploys
**Created:** 2022-03-19T11:45:18Z
**Posts:** 5

## Post 1 by @Alan_Dew — 2022-03-19T11:45:18Z

I’m just beginning with sage, and i’m having trouble understanding a simple thing about deploying my theme via FTP. In the docs, it says once you compiled your assets for production, you just Upload all files and folders in your theme except the `node_modules` directory to your host.

My question is the following : in my folder, i have files like .editorconfig, .eslintrc.js, .git, .gitignore, package.json, package-lock.json, yarn.lock etc.

Do you also upload all these files ? As a newbie, it seems a little bit weird to import my .git for example… Sorry if my question sounds simple but again, i’m still learning development

---

## Post 2 by @vipul — 2022-03-19T12:13:49Z

Hello @Alan_Dew  
no need to upload all file such as (node\_module, .editorconfig, .eslintrc.js, .git, .gitignore, package.json, package-lock.json, yarn.lock) bcoz you have to create production build than only upload production then theme will work.  
but if you want to edit theme or modify code on server then you have tu upload and setup everything. but I think it best way to just upload production build and in future anything need to modify then re upload production build.

---

## Post 3 by @Alan_Dew — 2022-03-19T13:07:33Z

Hey @vipul thanks for the answer! Well what do you call production build?  
Before that i was using understrap, and i just ran a command that created a build folder with all the files (or a .zip). Right now when i’m looking at my folders after running ‘composer install --no-dev’, there are still a lot of files… how do i know which ones to upload and which ones aren’t needed ?

---

## Post 4 by @alwaysblank — 2022-03-19T14:13:53Z

> [@Alan_Dew](#):
>
> i have files like .editorconfig, .eslintrc.js, .git, .gitignore, package.json, package-lock.json, yarn.lock etc.

You don’t need to upload those, but uploading them won’t affect the operation of your site.

There isn’t a way to say conclusively what files should be uploaded because you can arrange files in your theme how you like: A good guideline is to ask whether a file is or could be called or executed when your theme is used. If so, upload that file. The files you mentioned are only used by the developer, they are never used by the theme, so they don’t need to be uploaded.

> [@Alan_Dew](#):
>
> what do you call production build?

Generally “production build” refers to the results of running the asset build command, which you seem to already know about.

---

## Post 5 by @strarsis — 2022-03-19T20:06:36Z

> [@Deployment on Shared Hosting](https://discourse.roots.io/t/deployment-on-shared-hosting/20399/3):
>
> IMHO it could be quite helpful to add an “eject” task to Sage that automatically creates a minimal theme ZIP as build artifact. Note: node\_modules/ is only required for building the theme - it is not needed and should not be needed by the theme during runtime. If there are any files that should be available for the theme, either add them using webpack (e.g. imported SASS, url(...)) or copy them from node\_modules/ into dist/ or - for some cases - resources/. For Sage 10 themes: #!/bin/sh echo …
