
WooCommerce is a WordPress plugin that lets you create an online store with a comprehensive range of features to support your online business, making it more effective and efficient. These comprehensive features enable sellers to offer their products or services through their websites. WooCommerce features include a shopping cart, payments, reports, store performance analytics, product management, and other online store features. Essentially, WooCommerce is a recommended WordPress plugin for individuals or businesses looking to create their own sales platform through an online store on their website. In this article, we will show you how to install WooCommerce on AlmaLinux 10.
Table of Contents
Prerequisites
- An AlmaLinux 10 VPS
- SSH root access or a regular system user with sudo privileges
Conventions
# – given commands should be executed with root privileges either directly as a root user or by use of sudo command
$ – given commands should be executed as a regular user
Step 1: Log in to your server via SSH
First, you will need to log in to your AlmaLinux 8 VPS via SSH as the root user:
ssh root@IP_Address -p Port_number
You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the system user with sudo privileges.
You can check whether you have the proper AlmaLinux version installed on your server with the following command:
# cat /etc/almalinux-release
It will return an output like this.
AlmaLinux release 10.1 (Heliotrope Lion)
We will use ‘root’ in this article when running the shell commands. If you want to use your regular user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands.
Step 2: Install and Configure Web Server
In this article, we will use Nginx as the web server. Let’s install it now.
# dnf install nginx -y
Then, we need to create an nginx server block for our WooCommerce website.
# nano /etc/nginx/conf.d/woocommerce.conf
Insert the following into the file.
upstream php-handler {
server unix:/run/php/php8.3-fpm.sock;
}
server {
listen 80;
server_name woocommerce.example.com;
root /var/www/html/wordpress;
index index.php;
server_tokens off;
access_log /var/log/nginx/wordpress_access.log;
error_log /var/log/nginx/wordpress_error.log;
client_max_body_size 64M;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_read_timeout 3600s;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 128k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass php-handler;
fastcgi_index index.php;
}
}
Make sure to replace woocommerce.example.com with your actual domain or subdomain name. Save and close the file. To apply the changes, we need to restart nginx.
# systemctl restart nginx
Step 3. Install PHP
AlmaLinux 10 ships with PHP 8.3, and WordPress supports this PHP version. So, we can install PHP directly using the default repository.
# dnf install php php-{bz2,ctype,curl,fpm,gd,intl,json,fileinfo,libxml,mbstring,mysqlnd,openssl,posix,session,simplexml,xmlreader,xmlwriter,zip,zlib} -y
Once the installation is completed, we can start the PHP-FPM service and enable it to run automatically upon server reboot.
# systemctl enable --now php-fpm
That’s it. The PHP-FPM service should be up and running now.
Step 4. Install MariaDB server and create a database
In this step, we will install MariaDB from the default AlmaLinux repository. To install the MariaDB server, execute the command below:
# dnf install mariadb-server -y
To make sure it starts automatically upon server reboot, run the command below to start MariaDB.
# systemctl enable --now mariadb
At this point, we can proceed to create a new database and a user for our WooCommerce website.
# mysql
After logging in to the MySQL shell, we can run these.
mysql> CREATE USER 'woocommerce'@'localhost' IDENTIFIED BY 'm0d1fyth15';
mysql> CREATE DATABASE woocommerce;
mysql> GRANT ALL PRIVILEGES ON woocommerce.* TO 'woocommerce'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> \q
Step 5: Install WordPress using WP-CLI
In this step, we will download WP-CLI and use it to install WordPress. WP-CLI is a tool for managing your WordPress installation through a command-line interface.
# wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /usr/local/bin/wp
The command above will download wp-cli.phar file and save it as /usr/local/bin/wp, so you can just type ‘wp’ in your command. But first, let’s make the file executable.
# chmod +x /usr/local/bin/wp
Now, let’s run these commands:
# echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
# source ~/.bashrc
At this point, you should be able to run ‘wp’, for example
# wp --info
This will return an output like this:
OS: Linux 6.12.0-124.47.1.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 31 06:07:05 EDT 2026 x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php
PHP version: 8.3.29
php.ini used: /etc/php.ini
MySQL binary: /bin/mariadb
MySQL version: mariadb Ver 15.1 Distrib 10.11.15-MariaDB, for Linux (x86_64) using EditLine wrapper
SQL modes: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: phar:///usr/local/bin/wp
WP-CLI packages dir:
WP-CLI cache dir: /root/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.12.0
Next, let’s create a directory for our WordPress website’s document root, then download the latest version of WordPress.
# mkdir /var/www/wordpress && cd $_
# wp core download --allow-root
Now you can see that /var/www/wordpress/contains WordPress core files. You can list them with the ‘ll’ command.
As you can see, there is no wp-config.php in the directory. Let’s proceed with creating the wp-config.php file. But before running the command below, make sure you replace the database name, database username, and the password.
# wp core config --dbhost=localhost --dbname=woocommerce --dbuser=woocommerce --dbpass=m0d1fyth15 --allow-root
You will see a message that the wp-config.php file has been generated.
Success: Generated 'wp-config.php' file.
Since wp-config.php file is generated, we can proceed with installing WordPress. Let’s run this command to install it. You can modify the information in the command below before running it.
# wp core install --url=https://woocommerce.example.com/ --title="New WordPress Website" --admin_name=wrdpadmin --admin_password=m0d1fyth15 --admin_email=you@yourdomain.com --allow-root
You will see a successful message like this:
Success: WordPress installed successfully.
Now, we can correct the file’s permission.
# chown -R apache: /var/www/wordpress
That’s it. WordPress has been installed at https://wordpress.example.com/, and you can open it using any web browser you like.
Step 6. Install WooCommerce
There are at least two options to install WooCommerce. We can log in to the WordPress backend and install the plugin through the plugins menu, or install it using the WordPress CLI, just like when installing WordPress. Let’s install it using the WordPress CLI command.
# cd /var/www/wordpress
# wp plugin install woocommerce --activate --allow-root
You will see a message similar to this:
Installing WooCommerce (10.6.2)
Downloading installation package from https://downloads.wordpress.org/plugin/woocommerce.10.6.2.zip...
Unpacking the package...
Installing the plugin...
Plugin installed successfully.
Activating 'woocommerce'...
Plugin 'woocommerce' activated.
Success: Installed 1 of 1 plugins.
We should correct the permission again now:
# chown -R apache: /var/www/wordpress
That’s it all! You have successfully installed WooCommerce on AlmaLinux 10.
Of course, you don’t have to install WooCommerce on AlmaLinux 10 if you use one of our Managed WooCommerce Hosting services, in which case you can simply ask our expert Linux administrators to install WooCommerce on AlmaLinux 10 for you for free. They are available 24×7 and will take care of your request immediately. Managing WooCommerce websites is not just about the installation; we can help you optimize your WooCommerce installation if you have an active service with us.
If you liked this post about how to install WooCommerce on AlmaLinux 10, please share it with your friends or leave a comment below.