Armitage2k
Armitage2k

Reputation: 1264

CakePHP - how to use composer with online webserver?

OK, absolute CakePHP noob here, be patient.

I managed to install CakePHP 3.4.9 (latest) onto my webserver (online - shared host), by using the Softaculous software installer that came as part of the host's cPanel.

I now would like to install the AdminLTE theme for CakePHP (see here), but it seems this is only possible if done via Composer. Composer, if I understand this correctly, is an offline dependency manager that is run via command-line (eg. MS-Dos) and supposed to help install plugins for offline applications that sit in a development framework such as XAMPP.

Since my website is not available offline (yet), and I have no SSH access to my webhost, how would I go about installing composer on my webserver?

Thank you for any advice

Upvotes: 0

Views: 810

Answers (1)

MontrealDevOne
MontrealDevOne

Reputation: 1044

There is no way to run composer without ssh access. If the security of the webserver is weak, run composer via php

<?php shell_exec('php composer.phar install')?>

Other options are:

  1. Run composer locally and then zip your local Cakephp install directory and export via FTP and then unzip it on production server.
  2. Drag and drop your cakephp install directory to your web folder on production server.
  3. Host your website from home using Duckdns, or Cloudflare etc.
  4. Move to Dedicated hosting Digital Ocean, AWS etc

Upvotes: 1

Related Questions