Setting up Sage 9 theme on shared hosting with WP Pusher or FTP?

Possibly a newbie question here, but I’m trying to package up a Sage 9 theme to a shared hosting site (no composer install available) – and Wordpress can’t seem to find index.php, functions.php or style.css in the resources folder. I’ve read this thread [Sage 9 folder structure] which says that Wordpress should just find it, but every time I try to upload a .zip or use WP Pusher, Wordpress complains that those files don’t exist, and won’t activate the theme.

In both the .zip and in the repository, the vendor and dist folders are there. Feel like I must be missing something obvious. Any ideas?

I frequently do this and never had a problem (even on shared hosting).

The workflow is:

  • Run yarn, composer install and then yarn build:production on your local dev machine inside the theme folder.
  • Upload everything from your theme folder (including the vendor and dist folder), but the node_modules folder.

Is that what you’re doing?
With WP Pusher you’d probably add the vendor and dist folder to your version control.

1 Like

Yeah, that’s exactly what I’ve been doing. Super strange.

Yeah, indeed… Completely guessing here, but are you sure you have at least php v5.6.4?

What version of WordPress are you using?

@shoetten: Good call on that – the first site I tried it on is not, but I spun up a brand new Digital Ocean droplet running php 7 to see if that was the issue, and had the same error.

@benspants: 4.8

I apologize if these seem like dumb questions, but I’m just trying to run through everything I can think of, even the simplest stuff:

  • Have you verified that functions.php, styles.css, and index.php are actually on your server, in the location they should be in (theme_name/resources/)?
  • Do you have any plugins on the site you’re trying to deploy to? Have you tried disabling them?
  • Can you successfully deploy an unmodified version of Sage 9?
  • What’s your local development environment (that you’re trying to deploy from)?
  • What’s the actual text of the error message you get when you try to activate the theme?
  • In the WP backend, does the theme show as ‘broken’ or does it appear fully functional until you attempt to activate it?

@benspants: These aren’t dumb questions at all – if it works for everyone but me, it’s got to be something fundamental like this, and I super appreciate you listing out a bunch of things to check.

  • Verified that functions.php, styles.css, and index.php are all in fact in the resources folder.
  • Local dev environment is Laravel Valet
  • When I try to upload the theme as a .zip, I get The package could not be installed. The theme is missing the style.css stylesheet. Same issue using WP Pusher. When I ssh into the test server (can’t do this on the shared hosting that ultimately I’d like to get the theme on), and git clone the theme into the themes folder, WP will let me activate it, but it’s a White Screen Of Death.

Will try deploying an unmodified version of Sage 9 (good idea!) and disabling plugins later tonight and report back if it worked. Thank you!

Having the same issue here, any help on this issue would be great.

Just tried using composer to create a brand new, unmodified version of Sage 9, zipping it, and then uploading it – same error:

The package could not be installed. The theme is missing the style.css stylesheet.

Theme install failed.

De-activated all the plugins, tried again, same error.

Bump for this, having the same issues. Worrying that it hasn’t been addressed in a month and a half…

Still waiting on this as well.

It’s an open source project, and all the work on it is by volunteers (no one is paying the core Roots team to do this). If you are dependent on this feature, contributing to the project in the form of a pull request is always welcomed!


I’m actually skipping most of the whole setup used in Root (mea culpa) since I’m interested to have just the theme compiled.
Locally I’m using XAMPP and to deploy I’m using Travis CI and a shared hosting.
I created an article on my website where I explain the passages.

To summarize in few steps:

  • create an account to Git and Travis CI if you have not
  • create an FTP user for the project
  • add the Travis file to make copy the project using LFTP

This is the result updating just the theme via Git:

I’m having a similar issue on a multisite install of WordPress 4.8.2. My latest theme built on Sage 9 errors as a broken theme with style.css and index.php in …/reasources/… and if I move the style.css and index.php into the main theme directory it leaves me with a blank white screen.

You’ll need to follow these steps if you’re wanting to move those files to the theme root folder:

Thanks @ben. Just loaded the theme on a fresh install of Trellis and the theme works perfectly. Then deployed to a new Trellis provisioned single site install staging server and I’m left with a blank theme. Trying the theme files move instructions next on the staging server next.

I was able to resolve the issue and get the theme to load. I followed these instructions and discovered a conflict in my build. I was loading “soberwp/controller” via Bedrock’s composer.json and in them Sage 9 theme’s composer.json. After making the sage-installer edits and disabling soberwp/controller from mu-plugins the theme loaded just fine. Thanks again to everyone for posting.

1 Like

The question is - how do you migrate db between localhost and staging server if staging server is runnign vanilla wordpress?

Any idea?

This sounds like a more general WordPress question than something Sage-specific. You might try the WordPress StackExchange: