Can't publish into a subdirectory

I have two sites (separate sparkle files) - one is desktop, one is mobile.

When I publish the desktop version, I use ftp user “desktop” and it publishes to /public_html and all is well.

When I try to publish the mobile version, I use ftp user “mobile” and this user is set up to go into directory /public_html/mobile automatically in cPanel. However, Sparkle seems to not like this config (pushing into a subdirectory). It brings up a window asking for a folder location, which I leave blank (since this user is already dropped into the correct folder) and I get the error “The selected folder is not published to

Any tips, @duncan ?

Thanks in advance!

A few issues, but the crux is in Sparkle you need to create all layouts in a single project file, there’s no support for publishing different projects as the same site.

Alright, thanks for clarifying @duncan.

For future readers who may need a hack, what you would need to do in this case is create a subdomain like “” so that Sparkle will see this as a different site altogether. (Instead of putting multiple sites in nested directories.)

Or upload the secondary site via normal FTP, which is the less awesome solution. :wink:

You can use a /mobile subfolder as well. The point though is that it will require a redirect, and that slows the site down and makes it worse seo-wise.

1 Like

That’s true. It’s a very specific use-case because the mobile site is so drastically different than the desktop version. Nobody should copy this unless they know the SEO implications!

(For advanced developers, the reason we are doing this is because we run multiple advertising streams to our sites, and we want to drive people to the correct funnel based on their source and device. The only good way to do this we’ve found is through redirects and secondary micro-sites.)

However I’m a bit confused now @duncan - how can I use a /mobile subfolder?

The secondary FTP for the mobile sub-site is set up to drop me directly into public_html/mobile, so this FTP user sees that subdirectory as the root. But Sparkle doesn’t want to let me publish there, and keeps asking me for a folder. I can publish it manually by using Export and then regular FTP, but it would be nice to be able to figure this out so I can one-click publish it. Any tips? Or is it a non-starter?

@WebRoyal, My understanding is that when we FTP our Sparkle site (and we have activated the breakpoints beforehand), that what is uploaded detects the device (the server) viewing your site and sends the device the appropriate breakpoint.

If you want you can totally change your mobile breakpoint as opposed to the other breakpoints by hiding all elements and introducing totally new elements and hiding them on all the other breakpoints - this means that your mobile website will look completely different to your desktop/tablet breakpoints.

Anyway, just my take on it…

Your web address needs to match the folder. So say

1 Like

That worked perfectly - thank you!

@greenskin Yes, thanks - it was an extreme case where the sites are so different, I’d have to hide every element. So we made the decision to separate the sites.

1 Like