Frappe ERPNext and Woocommerce on same server - Ubuntu

If you're running a server with Ubuntu 24+, already hosting Frappe, and using Nginx and MariaDB, adding WooCommerce alongside it is totally possible. This guide walks you through setting up WordPress

 · 2 min read

Introducing the WooCommerce.com Update Manager - WooCommerce


I am assuming you already have a server with following configuration. In case if you dont, please refer our past blog https://cloud.erpgulf.com/blog/support-forum/installing-erpnext-version-15-on-ubuntu-24+


  1. Ubuntu 24.04 or later
  2. Nginx installed and configured (likely for Frappe)
  3. MariaDB running (used by Frappe)
  4. Frappe installed and active



Now we start .


sudo apt install php php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-zip php-soap php-intl unzip curl -y


Create a directory for WooCommerce

sudo mkdir -p /var/www/woocommerce

cd /var/www/woocommerce



Download and extract WordPress:

curl -O https://wordpress.org/latest.tar.gz

tar -xzvf latest.tar.gz

sudo mv wordpress/* .

sudo rm -rf wordpress latest.tar.gz


Set proper permissions:

sudo chown -R www-data:www-data /var/www/woocommerce

sudo chmod -R 755 /var/www/woocommerce


mysql

CREATE DATABASE woocommerce DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

CREATE USER 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';

GRANT ALL PRIVILEGES ON woocommerce.* TO 'yourusername'@'localhost';

FLUSH PRIVILEGES;

EXIT;


Create a new Nginx server block to serve the WooCommerce site:


sudo vim /etc/nginx/conf.d/woo.conf


( At this stage you may need to understand how letsencrypt certificate works. Please check the above mentioned blog )


server {

   listen 443 ssl;

   server_name graf.qa;


   root /var/www/woocommerce;

   index index.php index.html index.htm;


   access_log /var/log/nginx/wordpress_ssl_access.log;

   error_log /var/log/nginx/wordpress_ssl_error.log;


   ssl_certificate /etc/letsencrypt/live/graf.qa/fullchain.pem;

   ssl_certificate_key /etc/letsencrypt/live/graf.qa/privkey.pem;

   ssl_session_timeout 5m;

   ssl_session_cache shared:SSL:10m;

   ssl_session_tickets off;

   ssl_stapling on;

   ssl_stapling_verify on;

   ssl_protocols TLSv1.2 TLSv1.3;

   ssl_ciphers EECDH+AESGCM:EDH+AESGCM;

   ssl_ecdh_curve secp384r1;

   ssl_prefer_server_ciphers on;


   location / {

       try_files $uri $uri/ /index.php?$args;

   }


   location ~ \.php$ {

       include snippets/fastcgi-php.conf;

       fastcgi_pass unix:/run/php/php8.3-fpm.sock;

       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

       include fastcgi_params;

   }


   location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|otf)$ {

       expires max;

       log_not_found off;

   }


   location ~ /\. {

       deny all;

   }


   # Optional security headers

   add_header X-Frame-Options "SAMEORIGIN";

   add_header X-Content-Type-Options "nosniff";

   add_header X-XSS-Protection "1; mode=block";

}





If Apache installed with wordpress, remove it

sudo apt purge apache2*

sudo apt autoremove


----------

sudo nginx -t

sudo systemctl reload nginx


First visit your site and complete setup

https://yoursite.com


visit the site . and for administation use

https://yoursite.com:/wp-admin


Install WooCommerce Plugin


From the WordPress dashboard:

  1. Go to Plugins > Add New
  2. Search for WooCommerce
  3. Click Install Now and then Activate


You have now both Frappe ERPNext and WooCommerce.


--------


Now you need to have integration module to connect between ERPNext and WooCommerce

Please contact support@Claudion.com


Team Claudion handling Ubuntu servers on cloud in Riyadh and Jeddah

We manage and maintain Ubuntu-based cloud servers across Riyadh and Jeddah. From deployments to patching, security hardening to SSL, we’re hands-on with everything that keeps your apps running smoothly. Any Ubuntu related stuff in Saudi, send us email teamubuntu@claudion.com

No comments yet.

Add a comment
Ctrl+Enter to add comment