I am pretty excited about the latest release of Sylius, a much-awaited ecommerce platform.
For the uninitiated, Sylius is a lightweight open source ecommerce framework which lets you start online shops for absolutely free. The platform is built on Symfony framework and has all the latest tools, libraries and components to nurture e-commerce business requirements such as invoicing, storefront maintenance, user and product management.
Keeping in mind the simplicity of platform, I decided to try it on Cloudways managed PHP hosting Platform. I am not going in deef for what sylius is? You can read it from the above link I provide. For the purpose of this tutorial, I am assuming that you have already signed up at the Platform and has launched a custom PHP application. If you need help with this process, check out the following GIF:
Now let’s start the process of installing Sylius on Cloudways.
Install Sylius v1.0.0 via SSH
Open the SSH terminal from the Server Management tab. You can also use PuTTY for this purpose. Find the SSH credentials under the Master Credentials heading and login to the SSH terminal:
After the login, move to the application folder using the
cd command and run the following command to start installing Sylius:
composer create-project -s beta sylius/sylius-standard myshop
The command will start installing the long list of dependencies for Sylius. Once the installation finishes, Sylius will ask for the database credentials. You can find the database username and password in the Application Access Details.
Enter the database details in the SSH terminal:
I will keep the rest of the values to default so that the config file will have the defaults Sylius settings. If the need arises, you can obviously change these settings later.
At this point, Sylius is half installed because I still need to setup the database and the shop credentials.
Install Node Dependencies
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.
Now move to the myshop folder by using
cd myshop and run the following command
npm install. Once the command finishes, run the next command,
npm run gulp.
You will observe that several automated tasks will be executed.
Populate the Database and Sylius
Before explaining this step, I want you to comment out the three lines in config_dev.yml file. This is because Sylius tries to find the database setup for the dev environment with the suffix “_dev”. However, I want to use the main database from parameters.yml file.
Now run the following command:
This command will perform several more steps in the installation including:
- Installing Sylius ecommerce shop
- Check system requirements
- Setting up the database
- Loading sample data for the environment
- Shop configurations
- Assets installation
In the Shop Configuration step, I would need to enter the email and password for the admin login.
Finally, the last step is to update the webroot of the application in the Platform. Move to the Application Settings tab and update it.
Now open the application URL as shown in the Access Details tab. Append “/admin” to this URL. Once the page loads up, use the credentials you provided earlier for admin login.
Installing Sylius on Cloudways is easy! I strongly recommend you to try out this great ecommerce platform on the industry recognized managed cloud hosting solution. If you face any issues during the process, do post a comment below and I will get back to you.
Create PHP websites without the worry of server management.
Deploy your PHP app on optimized PHP hosting servers.