Roots Discourse

Probleme with the deployement of a Sage theme (9.0)

hello there
i tried to deploy my new sage (9) Theme by following an old school ftp way. I read the official documentation in the sage book, but it does not help.

My theme works locally on my computer with flywheel. But when i am sending my work on my production server after the β€œyarn build:production”, the sage theme makes my whole website broken. A message appeared telling me that the wordpress can’t work properly. And nothing is working anymore even the back-office.
what did i missed to make this deployment fine ?
Where could i find a complete tutorial to deploy my theme on a server with the FTP way ?

thank you for reading.

Did you upload the vendor directory? It’s mandatory to generate and upload it to make it work.
As you are uploading it via FTP do

$ composer update

and upload vendor folder

I remembered I have 1 project set up in the way you should not do it :slight_smile: => upload theme via FTP

however wp-content/themes/tavti have this stuff uploaded
01

and in tavt folder root I have these files

don`t really remember now if I had to set up anything else from WP side

That seems to be a Sage v8 theme, not Sage v9.

Cheers!

Thanks for you help.
I did an upload after β€œyarn build:production” of the β€œdist” and the β€œressource” folders, and β€œcomposer update” before the upload of the β€œvendor” folder.

It does not work.
Well… i don’t understand how Sage works. I should go back to the old school WO development.

Thanks

I would recommend using a git repo to install your theme. Here are the complete files in my repository:

demyx
β”œβ”€β”€ app
β”‚   β”œβ”€β”€ Controllers
β”‚   β”‚   β”œβ”€β”€ App.php
β”‚   β”‚   β”œβ”€β”€ FrontPage.php
β”‚   β”‚   └── PageStatistics.php
β”‚   β”œβ”€β”€ active.php
β”‚   β”œβ”€β”€ admin.php
β”‚   β”œβ”€β”€ comments.php
β”‚   β”œβ”€β”€ filters.php
β”‚   β”œβ”€β”€ helpers.php
β”‚   β”œβ”€β”€ image.php
β”‚   β”œβ”€β”€ rest.php
β”‚   β”œβ”€β”€ servers.php
β”‚   └── setup.php
β”œβ”€β”€ config
β”‚   β”œβ”€β”€ assets.php
β”‚   β”œβ”€β”€ theme.php
β”‚   └── view.php
β”œβ”€β”€ dist
β”‚   β”œβ”€β”€ assets.json
β”‚   β”œβ”€β”€ images
β”‚   β”‚   β”œβ”€β”€ demyx-login_7a52e60c.png
β”‚   β”‚   β”œβ”€β”€ favicon_97c3984d.png
β”‚   β”‚   β”œβ”€β”€ preview_eccb517b.gif
β”‚   β”‚   β”œβ”€β”€ ribbon-left_4370fd17.png
β”‚   β”‚   └── topbar-logo_102ae127.png
β”‚   β”œβ”€β”€ scripts
β”‚   β”‚   β”œβ”€β”€ customizer_fdaaf4c9.js
β”‚   β”‚   β”œβ”€β”€ demyx_fdaaf4c9.js
β”‚   β”‚   β”œβ”€β”€ login_fdaaf4c9.js
β”‚   β”‚   └── main_fdaaf4c9.js
β”‚   └── styles
β”‚       β”œβ”€β”€ demyx_fdaaf4c9.css
β”‚       β”œβ”€β”€ login_fdaaf4c9.css
β”‚       └── main_fdaaf4c9.css
β”œβ”€β”€ resources
β”‚   β”œβ”€β”€ functions.php
β”‚   β”œβ”€β”€ index.php
β”‚   β”œβ”€β”€ screenshot.png
β”‚   β”œβ”€β”€ style.css
β”‚   └── views
β”‚       β”œβ”€β”€ 404.blade.php
β”‚       β”œβ”€β”€ archive.blade.php
β”‚       β”œβ”€β”€ front-page.blade.php
β”‚       β”œβ”€β”€ index.blade.php
β”‚       β”œβ”€β”€ layouts
β”‚       β”‚   └── app.blade.php
β”‚       β”œβ”€β”€ page-blog.blade.php
β”‚       β”œβ”€β”€ page-statistics.blade.php
β”‚       β”œβ”€β”€ page.blade.php
β”‚       β”œβ”€β”€ partials
β”‚       β”‚   β”œβ”€β”€ blog-meta.blade.php
β”‚       β”‚   β”œβ”€β”€ blog.blade.php
β”‚       β”‚   β”œβ”€β”€ comments.blade.php
β”‚       β”‚   β”œβ”€β”€ content-page.blade.php
β”‚       β”‚   β”œβ”€β”€ content-search.blade.php
β”‚       β”‚   β”œβ”€β”€ content-single.blade.php
β”‚       β”‚   β”œβ”€β”€ content.blade.php
β”‚       β”‚   β”œβ”€β”€ entry-meta.blade.php
β”‚       β”‚   β”œβ”€β”€ footer.blade.php
β”‚       β”‚   β”œβ”€β”€ head.blade.php
β”‚       β”‚   β”œβ”€β”€ header.blade.php
β”‚       β”‚   β”œβ”€β”€ page-header.blade.php
β”‚       β”‚   └── sidebar.blade.php
β”‚       β”œβ”€β”€ search.blade.php
β”‚       β”œβ”€β”€ single.blade.php
β”‚       └── template-custom.blade.php
└── vendor # Include whatever is in here after composer install --no-dev

I have a really simple theme but the files at the root level are only counting 5. If you include .gitignore, that’s 6.

OK people,
i followed your advice. I don’t really understand everything but i creates a git_depot on my remote server and i installed composer there, too. I uploaded the β€œ/dist” folder and it is working. Except the url image in my β€œmain.css”. But i think it is related to β€œlocal/Flywheel” i suppose, and the way it is managing it.

Thank you for your help. Git, in the worklfow, is still a little mysterious. I can see as powerfull it can be, but how to use it ? the sage documentation would be more explicit, i would be a smiler junior developer ! :slight_smile: :slight_smile: :slight_smile: