Assets not found on deployment, Trellis + Sage 10

Hello,

I’m having issues configuring staging site on Kinsta. Site is returning 404 for plugin assets and theme assets. Upon inspecting app.css source I found out that when I remove /wp from asset source url it loads normaly.

image
image

In .env file WP_SITEURL=“${WP_HOME}/wp”

For development I’m using lando and assets in local development are served without /wp in the source.

image

What am I doing wrong here?

Excuse my rashness, this issue has already been solved.

For folks using Soil + relative URLs, I added a workaround from @QWp6t that I’ve been using to avoid that bug:

    # Soil theme support
    add_theme_support('soil', [
        'clean-up',
        'nav-walker',
        'nice-search',
-       'relative-urls',
+       'relative-urls' => php_sapi_name() !== 'cli',
    ]);
1 Like