Shared hosting, update theme, how to deal with it

Hi all,

I have a client who wants to stay on a shared hosting service. I’m sure some theme features will have to change in the near future… github-updater is not mapped to the sage structure. I would like to ask how do you deal with similar cases? Two ideas come to mind.

  1. Change the sage structure so that github-upadter will recognize files.
  2. Just copy the files to the template folder again and again. (no version tracking possible).

Thanks for the answer!

If you have ssh access you can use Deployer or Capistrano (there’s a Bedrock-Capistrano repo on the Roots Github) for the whole WordPress installation if you want that.

I don’t have experience with github updater, but isn’t it just a extra rule in the style.css? You might be able to use github actions to build the theme and add it as release file if that’s the issue you’re running in to.

1 Like

Hi @Jacek, with ssh access, usually i set multiple repos then i commit / push changes.
The first on github, the second on the shared hosting with an empty repo (look for “git init --bare”).
When you push your changes, both repos will be updated.
By this way, you also needs git on your shared hosting.

Without ssh, I remember someone wrote on the forum to use rsync with ftp.
Can’t give you more info about this solution.

1 Like

@Xilonz Thank you for your reply! Capristrano looks very cool.
Actually in this case, all I need is the deploy template.

Github updater, doesn’t recognize style.css etc. because sage keeps them in a subfolder /resources

@yeah you won’t believe but there is not ssh access in this hosting provider. Thanks for your comment, I will check rsync.

What about adding a style.css with just the Github URL and no WordPress theme definition.

Sounds like that should work. It says it only requires the correct Github URL and folder name.

Otherwise I’d suggest asking on their slack.

@Xilonz Tahnks for tips. I tried, copied style.css with github URIs appended, and index.php because was require too. Github-Updater works and copied files from github but blank page is displayed. So close :slight_smile:

The white page is probably an error (enable error reporting). My guess is that you need to run composer install. Unfortunately you can’t run that on your host so you have 2 options (I think).

  • Create a build branch and commit all files (including all composer files) to it, and use that branch for github-updater.
  • Use Github Actions (or similar) to build and create the dist archive (I think you can also do this manually). I imagine it wil be possible to use that build archive. I believe I saw an example for Bitbucket Pipelines in the Wiki.

Thank you @Xilonz for your awesome help. Right now I try to get permission to ssh for this with hosting provider, so maybe that will be easier.

Thank you @Xilonz and @yeah I appreciate your help. I have unlocked ssh, so I just clone my repo and it works. One and last question in this case, to make sure. Are you push all folders to repo without node_js if you clone repo to hosting, or you you ignore some other files/folders in gitignore sage file ?

In my case, working with shared hosting and composer enabled, i put on .gitignore: “node_modules”, “vendor”, and some files.
Then i build the theme and i push it to both repos (github and shared hosting repo).
About composer dependencies, i download them with “composer install” through ssh.

Sorry, Idk how works github-updater…
Hope can help you.

1 Like

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