Hosting issues with composer

Hi there, I’m about to deploy a bedrock site to a shared host but they’re not sure if I’ll be ablr to use composer on the server. Is composer 100% needed for the site to run or is there another way to get dependencies in. Note - changing host at present is not an option so in the worst case scenario I’d like to keep the structure of my bedrock site without using composer. Is this possible?

If not, can I just drop my existing sage theme from the bedrock install into a standard wp install and be good to go? If so what modifications do i need to make?

Many thanks for your help

As a side note, I’m wondering how you manage plugin dependencies for premium plugins that are not listed on packagist? Things like Gravity forms and ACF Pro? I can ask this as a separate question if it helps others

Cheers M

The host doesn’t need to support Composer specifically, if you have shell access and the host meets the requirements, you can use the composer. phar file in any directory.

Ok, I’m having a nightmare trying to implement this. Can anybody tell me if it’s possilbe to just extract the sage theme from my local bedrock install into a regular wordpress install on my localhost where wordpress resides in a wp directory on the root? I’ve tried to do this and imported the bedrock installs database and ended up without styles and - if i try to log into wordpress - a redirect loop. I updated the home and site urls in phpmyadmin but nothing is working.

Any help would be awesome. I’m on Windows and this whole experience is ending with me purchasing a mac!

While there are a few things you need to do to convert a Bedrock installation to a normal WP installation, I don’t know why you would be getting a redirect error, especially if WordPress is installed to the same sub-directory.

  1. Do a search-replace on your database for any folders that have changed. This would most likely be app/ to wp-content/ for Bedrock to standard.
  2. Remember to add the WP_ENV to wp-config.php and set it to development for local development. Currently in Sage, running gulp will work for development, gulp --production works for staging and production. We’re looking into fixing this so they all work everywhere.
1 Like

@mulegoat Am I understanding you correctly that for the moment you wish to forego Bedrock and just use Sage? That’s where I’m at at the moment.

If you don’t have much of a WP install going yet - you can simply create a new WP install the traditional way, and copy or move the ‘sage’ directory from the web/app/themes directory in the Bedrock instal) into the themes directory in the new WP install. You should be able to activate the theme and go.

I highly recommend the Sage tutorial video!

1 Like

Cheers @mZoo - i did finally manage to get it working. Was more of an issue with permalinks. Once i’d recreated a clean install with the same permalink structure it all went fine. What made it all the harder was I couldn’t run the gulp build process. I followed all the steps to install npm, bower and gulp in the new install but i think in running ‘npm@latest’ might have resulted in a conflict with whatever existing version of node I’d setup globally.

How do you guys handle a new install of sage or bedrock? If for example you already have npm, bower and gulp installed globally do you update to latest npm and reinstall gulp and bower globally?

You can handle your premium plugins by setting up your own repo.

Just set up a VHost like packages.yourbiz.com and throw the zip files in the document root.

You can implement ip based security if you want.

1 Like

Hi. Could you detail how you can use a .phar without composer needing to be installed? Thanks.