Roots Discourse

Sage 9 assets path in wordpress subfolder installation

I’m doing yarn build:production for a deploy in a production server that is in a subfolder installation (/v2) but in local I’m running in /

Is there a way to tell webpack to build the assets path to that /v2/ folder?

I’m getting /wp-content/themes/fedesam/dist/images/image.png in my dist/style files but I need to be /v2/wp-content/themes/fedesam/dist/images/image.png


Edit the public path field in your config.json to be /v2/wp-content/themes/themeName. If u want different paths setup for each one then this may help

1 Like

You can set the public path dynamically from the command line without modifying Sage’s build process by setting SAGE_DIST_PATH: