How to Install Shopware Community Edition on Ubuntu Server Latest
Shopware Community Edition is a powerful and flexible eCommerce platform that allows you to build customized online stores quickly and easily. In this tutorial, you will learn how to install Shopware Community Edition on Ubuntu Server latest.
Prerequisites
Before you begin, you will need:
- Ubuntu Server latest installed on your system
- root access to the server
- Apache server installed and running
- MySQL server installed and running
- PHP 7.4 or higher installed
Make sure all of the above prerequisites are installed and configured properly.
Step 1: Download Shopware Community Edition
Visit Shopware's official website and download the latest version of the Shopware Community Edition. You can either download it manually or use the command below:
wget https://github.com/shopware/platform/releases/download/v6.4.4.0/platform.zip
Step 2: Extract the Zip Archive
Next, extract the downloaded ZIP archive using the following command:
unzip platform.zip
This will create a new directory called platform containing all the files required to install Shopware.
Step 3: Configure Apache
Create a virtual host file for your Shopware installation in the /etc/apache2/sites-available/ directory. Use the following command to create a new file named shopware.conf.
sudo nano /etc/apache2/sites-available/shopware.conf
Add the following configuration to the file, replacing example.com with your domain name:
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/shopware/public
<Directory /var/www/shopware>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
ErrorLog /var/log/apache2/shopware_error.log
CustomLog /var/log/apache2/shopware_access.log combined
</VirtualHost>
Save the file and exit.
Step 4: Move Shopware files to Document Root
Copy the contents of the platform directory to /var/www/shopware:
sudo cp -R platform/. /var/www/shopware
Make sure the /var/www/shopware directory is owned by the Apache user and group:
sudo chown -R www-data:www-data /var/www/shopware
Step 5: Create Shopware Database
Log in to the MySQL server and create a new database for Shopware:
mysql -u root -p
Enter your MySQL root password when prompted. Then, create a new database and user:
CREATE DATABASE shopware;
CREATE USER 'shopware'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON shopware.* TO 'shopware'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Replace password with a secure password of your choice.
Step 6: Install Composer and Dependencies
Shopware uses Composer to manage its dependencies. Install composer and required packages:
sudo apt-get install composer zip unzip php7.4-zip php7.4-dom php7.4-gd -y
Step 7: Install Shopware
To install Shopware, run the following command from the /var/www/shopware directory:
sudo composer install
This will install all the required dependencies for Shopware.
Step 8: Run the Installation Wizard
Finally, run the installation wizard by accessing your domain from a web browser.
Visit http://example.com/recovery/install/index.php and follow the on-screen instructions to complete the installation.
Conclusion
Now you have successfully installed Shopware Community Edition on Ubuntu Server Latest. You can now customize and configure your store to meet your requirements. Happy selling!