# [Sage 10] Deploying via FTP

**URL:** https://discourse.roots.io/t/sage-10-deploying-via-ftp/20643
**Category:** sage
**Created:** 2021-04-19T14:32:40Z
**Posts:** 7

## Post 1 by @AurelianSpodarec — 2021-04-19T14:32:40Z

Hi there!

I got an issue with deploying a site via FTP. I did use Sage 9 before, and it was very simple, no issues at all on deploying the site, there was also a dist folder from what I remember.

However, when I compile Sage 10, its as if nothing happens.

The command I used: `npm run-script build:production`

Here’s the screenshot: [https://i.imgur.com/YvbV7aZ.png](https://i.imgur.com/YvbV7aZ.png)

Blade is not compiled.

Also, what folders should I even upload to the FTP? This is what I uploaded: [https://i.imgur.com/WpAItO9.png](https://i.imgur.com/WpAItO9.png)

Any help would be appriciated!

---

## Post 2 by @strarsis — 2021-04-19T15:25:35Z

> [@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 …

---

## Post 3 by @AurelianSpodarec — 2021-04-19T15:47:08Z

I am not sure I understand the answer. I do have these files on the server if you look at one of the screenshots and it doesn’t work.

Specifically this code breaks it:

```
@if ( have_rows( 'flexible_content' ) ) 

@while ( have_rows( 'flexible_content' ) ) <?php the_row(); ?>

    @if ( have_rows( 'row' ) )

    @while ( have_rows( 'row' ) ) <?php the_row(); ?>

    <x-section bgColor="{{ $page[$count]['backgroundColor'] }}" gutter="{{ $page[$count]['gutter']}}" container="{{ $page[$count]['container'] }}">

        @if ( have_rows( 'column' ) )

        @while ( have_rows( 'column' ) ) <?php the_row(); ?>

        <div class="{{ $page[$count]['columnWidth'] }}">

            <?php 

                $layout = get_row_layout();

                $layoutConverted = str_replace( '_', '-', $layout);

                $file = ( $flexibleContentPath . str_replace( '_', '-', $layout) . '.blade.php' );

 

            ?>

            @if( file_exists( $file ))

                @include('blocks.' . $layoutConverted)

            @endif

        </div>

        @endwhile

        @endif

            

    </x-section>

    @endwhile

    @endif

    <?php $count++; ?>

@endwhile

@endif
```

And its the x-section that breaks it, if I remove x-section blade component and inside stuff, it will work.

---

## Post 4 by @strarsis — 2021-04-19T16:25:59Z

So you use an ACF field for including a partial, but you are pre-processing the partial path string first (replacing some parts).  
The `views/` folder must be available on the server so the partial can be included.

What do you see in the server logs? Are you also using a staging server?

---

## Post 5 by @AurelianSpodarec — 2021-04-19T17:28:31Z

I’ve uploaded every folder, all folders are uploaded.

I am using Digital Ocean, I’ve decided to just use FTP for now and play around on how to set up a proper environment later, as I need to get this deployed ASAP.

I just checked the logs actually, and this is what I get:

> [Mon Apr 19 13:21:40.523441 2021] [php7:error] [pid 51045] [client 104.219.72.44:50004] PHP Fatal error: require\_once(): Failed opening required ‘/var/www/html/wp-content/themes/kayTheddme/bootstrap/app.php’ (include\_path=‘.:/usr/share/php’) in /var/www/html/wp-content/themes/kayTheddme/functions.php on line 31, referer: [http://tipitraining.com/google-site-verification-content-fpk8ez12pdbewljjo9xhbxlv7lhxa9nplpcode87.php](http://tipitraining.com/google-site-verification-content-fpk8ez12pdbewljjo9xhbxlv7lhxa9nplpcode87.php)

Ummmm. Not sure if that has to do with Digital Ocean itself, and not Sage at this point.

What do you think?

---

## Post 6 by @strarsis — 2021-04-19T17:52:28Z

`/var/www/html/wp-content/themes/kayTheddme/bootstrap/app.php`  
So the `bootstrap/` folder with the `app.php` is missing.  
Though please note that Windows and \*nix differ in their default file system.  
\*nix file systems are case-sensitive (`App.php` is not the same as `app.php`),  
while Windows file systems (`App.php` is the same as `app.php`).

---

## Post 7 by @AurelianSpodarec — 2021-04-19T18:13:42Z

The folder is on the server, as seen on the screenshot above(and it does have the file inside). It seems to be the default file that sage created, the only thing I modified in that file is added a new ‘collect’, called ‘nav-walker’.

This is the file:  
\<?php

```
/*

|--------------------------------------------------------------------------

| Create The Application

|--------------------------------------------------------------------------

|

| The first thing we will do is create a new Acorn application instance

| which serves as the "glue" for all the components of Laravel, and is

| the IoC container for the system binding all of the various parts.

|

*/

\Roots\bootloader();

/*

|--------------------------------------------------------------------------

| Register Sage Theme Files

|--------------------------------------------------------------------------

|

| Out of the box, Sage ships with categorically named theme files

| containing common functionality and setup to be bootstrapped with your

| theme. Simply add (or remove) files from the array below to change what

| is registered alongside Sage.

|

*/

collect(['helpers', 'setup', 'filters', 'admin', 'nav-walker'])

    ->each(function ($file) {

        if (! locate_template($file = "app/{$file}.php", true, true)) {

            wp_die(

                sprintf(__('Error locating <code>%s</code> for inclusion.', 'sage'), $file)

            );

        }

    });

/*

|--------------------------------------------------------------------------

| Enable Sage Theme Support

|--------------------------------------------------------------------------

|

| Once our theme files are registered and available for use, we are almost

| ready to boot our application. But first, we need to signal to Acorn

| that we will need to initialize the necessary service providers built in

| for Sage when booting.

|

*/

add_theme_support('sage');
```

---

## Post 8 by @system — 2021-05-31T14:32:42Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
