Install Microweber on Ubuntu 14.04

In this article, we will explain how to install Microweber on an Ubuntu 14.04 VPS with MariaDB, PHP-FPM and Nginx. Microweber is a new generation content management system that allows you to create a website using drag and drop and it is built on top of Laravel 5. This guide should work on other Linux VPS systems as well but was tested and written for an Ubuntu 14.04 VPS.

Login to your VPS via SSH

ssh user@vps_IP

Update the system and install necessary packages

[user]$ sudo apt-get update && sudo apt-get -y upgrade
[user]$ sudo apt-get install software-properties-common git nano curl

Install MariaDB 10.0

To add the MariaDB repository to your sources list and install the latest MariaDB server, run the following commands:

[user]$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
[user]$ sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main'
[user]$ sudo apt-get update
[user]$ sudo apt-get install -y mariadb-server

When the installation is complete, run the following command to secure your installation:

[user]$ mysql_secure_installation

Next, we need to create a database for the Microweber installation.

[user]$ mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE microweber;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON microweber.* TO 'microweber'@'localhost' IDENTIFIED BY 'strong_password';
MariaDB [(none)]> \q

Install PHP, Composer and required PHP modules

To install the latest stable version of PHP version 5.6 and all necessary modules, run:

[user]$ sudo add-apt-repository -y ppa:ondrej/php5-5.6
[user]$ sudo apt-get update
[user]$ sudo apt-get -y install php5-fpm php5-cli php5-json php5-curl php5-gd php5-mysqlnd php5-imap php5-mcrypt

Composer is a dependency manager for PHP with which you can install packages. Composer will pull in all the required libraries and dependencies you need for your project.

[user]$ curl -sS https://getcomposer.org/installer | php
[user]$ sudo mv composer.phar /usr/local/bin/composer

Install Microweber

Create a root directory for your Microweber using the following command:

[user]$ mkdir -p ~/myMicroweber.com/public_html

Clone the project repository from GitHub:

[user]$ git clone https://github.com/microweber/microweber.git ~/myMicroweber.com/public_html

Change to public_html the directory:

[user]$ cd  ~/myMicroweber.com/public_html

Install all PHP dependencies using composer

[user]$ composer install

Run the following command to finish the Microweber installation:

[user]$php artisan microweber:install admin@site.com admin pass microweber microweber strong_password

PHP-FPM configuration

Create a new PHP-FPM pool for your user:

[user]$ sudo nano /etc/php/fpm/pool.d/your_user.conf
user = your_user
group = your_user
listen = /var/run/php-fpm-your_user.sock
listen.owner = your_user
listen.group = your_user
listen.mode = 0666
pm = ondemand
pm.max_children = 5
pm.process_idle_timeout = 10s
pm.max_requests = 200
chdir = /

Do not forget to change your_user with your username.
Restart PHP-FPM:

[user]$ sudo service php5-fpm restart

Install and configure Nginx

Ubuntu 14.04 comes with Nginx version 1.4, to install the latest stable version of Nginx version 1.8, run:

[user]$ sudo add-apt-repository -y ppa:nginx/stable
[user]$ sudo apt-get update
[user]$ sudo apt-get -y install nginx

Generate a self signed ssl certificate:

[user]$ sudo mkdir -p /etc/nginx/ssl
[user]$ cd /etc/nginx/ssl
[user]$ sudo openssl genrsa -des3 -passout pass:x -out microweber.pass.key 2048
[user]$ sudo openssl rsa -passin pass:x -in microweber.pass.key -out microweber.key
[user]$ sudo rm microweber.pass.key
[user]$ sudo openssl req -new -key microweber.key -out microweber.csr
[user]$ sudo openssl x509 -req -days 365 -in microweber.csr -signkey microweber.key -out microweber.crt

If you don’t want to get warnings associated with self-signed SSL Certificates, you can purchase a trusted SSL certificate here.

Next, create a new Nginx server block:

[user]$ sudo nano /etc/nginx/sites-available/myMicroweber.com
server {
    listen 443;
    server_name myMicroweber.com;
    root /home/your_user/myMicroweber.com/public_html;

    location / {
      try_files $uri $uri/ /index.php$is_args$args;

    ssl on;
    ssl_certificate     /etc/nginx/ssl/microweber.crt;
    ssl_certificate_key /etc/nginx/ssl/microweber.key;
    ssl_session_timeout 5m;
    ssl_ciphers               'AES128+EECDH:AES128+EDH:!aNULL';
    ssl_protocols              TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    access_log  /var/log/nginx/microweber.access.log;
    error_log   /var/log/nginx/microweber.error.log;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php-fpm-your_user.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;

    location ~ /\.ht {
        deny all;

server {
    listen      80;
    server_name myMicroweber.com;

    add_header Strict-Transport-Security max-age=2592000;
    rewrite ^ https://$server_name$request_uri? permanent;

Do not forget to change your_user with your username.

Activate the server block by creating a symbolic link :

[user]$ sudo ln -s /etc/nginx/sites-available/myMicroweber.com /etc/nginx/sites-enabled/myMicroweber.com

Test the Nginx configuration and restart nginx:

[user]$ sudo nginx -t
[user]$ sudo service nginx restart

That’s it. You have successfully installed Microweber on your Ubuntu 14.04 VPS. For more information about how to manage your Microweber installation, please refer to the official Microweber documentation.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Categories: Tutorials