WooCommerce / Sample Implementation

Discover how to easily configure Wordpress to connect to our API

1/Setup your Server

A basic configuration to unleash your webshop.

2/Install WooCommerce

Enable needed features for WooCommerce

3/Install WP-AllImport

Setup the import plugin

4/Update the stock

Enable fast-stock refresh

Setup your server

Prerequisites

The following guides assumes that you are familiar with Linux based systems, webservers and databases concepts.

This guide will describe how to complete a full Wordpress installation on Ubuntu 17.10 (installation steps may slightly vary with other distributions).

This guide will also explain how to connect the freshly created webshop with Stanley/Stella Systems that include:

 

Setup a new server to host your shop

You can do so with any service you wish to use, like Microsoft Azure or Amazon Webservices. As explained above, this guide will assume that you run an Ubuntu 17.10 server with MariaDB (MySQL). This guide also assume that your server runs with Apache2. 

Install Necessary components

You can do so with any service you wish to use, like Microsoft Azure or Amazon Webservices. As explained above, this guide will assume that you run an Ubuntu 17.10 server with MariaDB (MySQL). Our API is SSL encrypted so you will need to setup SSL certifications on your side as well to avoid errors.


It is wise to update the repository with the latest update, then upgrade all modules

$ sudo apt-get update
$ sudo apt-get upgrade


Now, install apache2 with required dependencies, and make sure it starts with the server

$ sudo apt install -y apache2 apache2-utils
$ sudo systemctl start apache2
$ sudo systemctl enable apache2
$ sudo chown www-data:www-data /var/www/html/ -R


Edit /etc/apache2/apache2.conf

$ sudo nano /etc.apache2/apache2.conf

Add the following directive:

ServerName localhost


Turn some apache mods on:

$ sudo a2enmod ssl
$ sudo a2enmod rewrite
$ sudo a2enmod headers


Finally restart the service to take your modification into account

$ sudo service apache2 restart

 

Install Maria DB

Install Maria DB with required dependencies, and make sure it starts with the server

$ sudo apt install mariadb-server mariadb-client
$ sudo systemctl start mariadb
$ sudo systemctl enable mariadb 

Secure MySql installation by running the following command:

$ sudo mysql_secure_installation

On Ubuntu 17.10 there is no root password defined at first setup, so just press "Enter" at the first prompt then define a new root password and start the secure install. You can basically press Y for all questions.

Install php7.1

Wordpress will use php7.1, so let's set it up:

$ sudo apt install php7.1 libapache2-mod-php7.1 php7.1-mysql php-common php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-readline php7.1-mbstring php7.1-xml php7.1-gd php7.1-json php7.1-curl php-zip php-simplexml

Activate the php module and restart apache

$ sudo a2enmod php7.1
$ sudo systemctl restart apache2

Edit php.ini (check the exact path)

$ sudo nano /etc/php/7.1/apache2/php.ini

Make sure the following lines exists and are as follows

file_uploads = On 
allow_url_fopen = On
memory_limit = 256M
upload_max_file_size = 64M
extension=simplexml.so
extension=zip.so

Check if correctly setup. Create a check file

sudo nano /var/www/html/info.php

In the file, copy paste the following directive

<?php phpinfo(); ?>

Then test at http://server_adress/info.php

For security reasons, remove that file afterwards:

$ sudo rm /var/www/html/info.php