|
| 1 | +How to deploy Sylius to Cloudways PHP Hosting? |
| 2 | +============================================== |
| 3 | + |
| 4 | +Cloudways is a managed hosting platform for custom PHP apps and PHP frameworks such as Symfony, Laravel, Codeigniter, Yii, |
| 5 | +CakePHP and many more. You can launch the servers on any of the five providers including DigitalOcean, Vultr, AWS, GCE and KYUP containers. |
| 6 | + |
| 7 | +The deployment process of Sylius on Cloudways is pretty much straightforward and easy. |
| 8 | + |
| 9 | +Now to install Sylius you need to go through series of few steps: |
| 10 | + |
| 11 | +1. Launch Server with Custom PHP App |
| 12 | +------------------------------------ |
| 13 | + |
| 14 | +You should `signup at Cloudways <https://platform.cloudways.com/signup>`_ to buy the PHP servers from the above mentioned providers. Simply go to the pricing page and choose your required plan. |
| 15 | +You then need to go through the verification process. Once it done login to platform and launch your first Custom PHP application. You can follow the Gif too. |
| 16 | + |
| 17 | +.. image:: ../_images/cloudways-php-server.gif |
| 18 | + :align: center |
| 19 | + |
| 20 | +Now let’s start the process of installing Sylius on Cloudways. |
| 21 | + |
| 22 | +2. Install the latest version of Sylius via SSH |
| 23 | +----------------------------------------------- |
| 24 | + |
| 25 | +Open the SSH terminal from the **Server Management tab**. You can also use PuTTY for this purpose. Find the SSH credentials under |
| 26 | +the **Master Credentials** heading and login to the SSH terminal: |
| 27 | + |
| 28 | +.. image:: ../_images/cloudways-ssh.png |
| 29 | + :align: center |
| 30 | + |
| 31 | +After the login, move to the application folder using the ``cd`` command and run the following command to start installing Sylius: |
| 32 | + |
| 33 | +.. code-block:: bash |
| 34 | +
|
| 35 | + $ composer create-project sylius/sylius-standard myshop |
| 36 | +
|
| 37 | +The command will start installing the long list of dependencies for Sylius. Once the installation finishes, Sylius will ask for the database credentials. |
| 38 | +You can find the database username and password in the Application Access Details. |
| 39 | + |
| 40 | +.. image:: ../_images/cloudways-database.png |
| 41 | + :align: center |
| 42 | + |
| 43 | +Enter the database details in the SSH terminal: |
| 44 | + |
| 45 | +.. image:: ../_images/cloudways-sylius-database.png |
| 46 | + :align: center |
| 47 | + |
| 48 | +Keep the rest of the values to default so that the config file will have the defaults Sylius settings. |
| 49 | +If the need arises, you can obviously change these settings later. |
| 50 | + |
| 51 | + |
| 52 | +3. Install Node Dependencies |
| 53 | +---------------------------- |
| 54 | + |
| 55 | +Sylius requires several Node packages, which also needs to be installed and updated before setting up the shop. In addition, I also need to start and setup Gulp. |
| 56 | + |
| 57 | +Now move to the myshop folder by using ``cd myshop`` and run the following command ``yarn install``. Once the command finishes, run the next command, ``yarn run gulp``. |
| 58 | + |
| 59 | +4. Install Sylius for the production environment |
| 60 | +------------------------------------------------ |
| 61 | + |
| 62 | +Now run the following command: |
| 63 | + |
| 64 | +.. code-block:: bash |
| 65 | +
|
| 66 | + $ bin/console sylius:install -e prod |
| 67 | +
|
| 68 | +5. Update The Webroot of the Application |
| 69 | +---------------------------------------- |
| 70 | + |
| 71 | +Finally, the last step is to update the webroot of the application in the Platform. Move to the **Application Settings** tab and update it. |
| 72 | + |
| 73 | +.. image:: ../_images/cloudways-sylius-webroot.png |
| 74 | + :align: center |
| 75 | + |
| 76 | +Now open the application URL as shown in the Access Details tab. |
| 77 | + |
| 78 | +Learn more |
| 79 | +---------- |
| 80 | + |
| 81 | +* Cloudways PHP Hosting documentation: `How to host PHP applications on DigitalOcean via Cloudways <https://cloudways.com/blog/host-php-on-digitalocean>`_ |
| 82 | +* PHP FAQs And Features: `Know more about PHP Hosting <https://cloudways.com/en/php-cloud-hosting.php>`_ |
| 83 | +* `What You As A User Can Do With Cloudways PHP Stack <https://cloudways.com/blog/php-stack-user-guide>`_ |
0 commit comments