UbuntuUbuntu Based

How To Install Microweber CMS on Ubuntu 24.04 LTS

Install Microweber CMS on Ubuntu 24.04

Microweber is an open-source drag-and-drop Content Management System (CMS) built on the PHP-based Laravel framework. It allows users to create and manage websites, blogs, or online stores with ease. Its intuitive nature, combined with features like live editing, e-commerce support, and a robust dashboard, makes it an appealing choice for beginners and experts alike. In this comprehensive guide, you will learn how to install Microweber CMS on Ubuntu 24.04 LTS step by step.

Built for performance and reliability, Ubuntu 24.04 LTS (Long Term Support) offers stability and security updates for an extended period, making it ideal for hosting your Microweber-powered website. By following the steps below, you’ll be able to set up a fully operational environment that leverages Apache or Nginx, PHP 8.1 (or higher), and MariaDB/MySQL, ensuring a solid foundation for your Microweber site.

Prerequisites

Before you begin, ensure you have the following prerequisites:

  • Ubuntu 24.04 LTS server with a non-root user capable of running sudo commands.
  • At least 1 GB of RAM (2 GB or more recommended), sufficient CPU resources, and reasonable disk space.
  • SSH or physical access to the server.
  • A registered domain name if you plan to set up Microweber using a fully qualified domain (optional but recommended).

These prerequisites follow a similar structure seen in guides for older Ubuntu versions but adapted for 24.04 LTS.

Step 1: Update and Prepare the System

Keeping the system up to date is critical. It helps you avoid errors during installation and ensures you have the latest security patches. Run the commands below:

sudo apt update && sudo apt upgrade -y
sudo reboot

The sudo apt update command refreshes the package manager’s index, while sudo apt upgrade -y installs newer versions of existing packages. After that, reboot your server to apply these updates. This practice is strongly advised before installing server software.

Step 2: Install and Configure the Web Server

Microweber can run on either Apache or Nginx. Choose the one you feel most comfortable managing.

Option A: Install and Configure Apache

Apache is a popular choice due to its extensive documentation and robust performance with PHP-based applications. You can install Apache using:

sudo apt install apache2 -y

Once installed, enable and start the service:

sudo systemctl enable apache2
sudo systemctl start apache2

You can verify that Apache is running by visiting http://your_server_ip or checking the service status with:

systemctl status apache2

Option B: Install and Configure Nginx

Nginx is known for its high performance under heavy loads and is also well-documented. Use:

sudo apt install nginx -y

Enable and start Nginx:

sudo systemctl enable nginx
sudo systemctl start nginx

Confirm Nginx is active:

systemctl status nginx

Configure Firewall Rules

Whether you choose Apache or Nginx, it’s important to allow HTTP (port 80) and HTTPS (port 443) traffic through the firewall. Assuming you have UFW (Uncomplicated Firewall) enabled, do:

sudo ufw allow 'Apache Full'

Or if you are using Nginx:

sudo ufw allow 'Nginx Full'

This makes your web server accessible to external traffic.

Step 3: Install and Configure PHP

Microweber is built on Laravel, which demands a fairly recent PHP version. Ubuntu 24.04 LTS typically provides at least PHP 8.1 or higher. If you need PHP 8.2 or another version, you may add a third-party repository. Here’s a standard PHP 8.1 installation:

sudo apt install php8.1 php8.1-cli php8.1-fpm php8.1-mysql \
php8.1-curl php8.1-mbstring php8.1-xml php8.1-zip -y

After installation, confirm the PHP version:

php --version

Depending on your server’s setup, you may want to adjust php.ini settings for optimal performance:

  • memory_limit: Increase if you have enough resources, for example memory_limit = 512M.
  • upload_max_filesize: If you plan to upload large files, ensure upload_max_filesize is sufficient, e.g., 50M or more.
  • post_max_size: Should match or exceed upload_max_filesize.
  • date.timezone: Set to your locality (e.g., date.timezone = "America/New_York").

Making these adjustments can prevent errors during Microweber installation, especially if you plan on uploading media or managing large databases.

Step 4: Install and Configure the Database Server

Microweber requires a functioning database server. Both MySQL and MariaDB are commonly used. In this example, we use MariaDB:

sudo apt install mariadb-server mariadb-client -y

Once installed, secure it:

sudo mysql_secure_installation

Follow the on-screen prompts to set a strong root password, remove anonymous users, disable remote root login, and remove test databases. This fortifies your database server.

Create a Database for Microweber

Next, create a database and user dedicated to Microweber:

sudo mysql -u root -p

Inside the MariaDB shell, run:

CREATE DATABASE microweber_db;
CREATE USER 'microweber_user'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON microweber_db.* TO 'microweber_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Replace microweber_db, microweber_user, and strong_password with values of your choice. This isolation of databases ensures better security and manageability.

Step 5: Download and Extract Microweber

Navigate to a temp directory like /tmp and download the latest Microweber release. Although official instructions often reference earlier Ubuntu releases, they remain valid for 24.04 LTS. Use either wget with a direct link from the Microweber Download Page, or from an updater endpoint.

cd /tmp
wget https://microweber.org/download.php -O microweber-latest.zip

Once downloaded, extract it to your web root. For Apache on Ubuntu, the default path is /var/www/html. You might also choose a custom directory structure:

sudo unzip microweber-latest.zip -d /var/www/html/microweber/

Adjust file ownership and permissions:

sudo chown -R www-data:www-data /var/www/html/microweber/
sudo chmod -R 755 /var/www/html/microweber/

Setting these correctly ensures Microweber can create and modify files during setup, an essential step to avoid permission-related errors.

Step 6: Configure Web Server for Microweber

After the Microweber files are in place, create a digital host configuration (Apache) or server block (Nginx). The final setup’s structure is similar for older Ubuntu versions, but fully compatible with 24.04.

Apache Configuration

  1. Create a new virtual host file for Microweber:
    sudo nano /etc/apache2/sites-available/microweber.conf
    
  2. Populate it with details:
    <VirtualHost *:80>
        ServerName your-domain.com
        DocumentRoot /var/www/html/microweber
    
        <Directory /var/www/html/microweber/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/microweber_error.log
        CustomLog ${APACHE_LOG_DIR}/microweber_access.log combined
    </VirtualHost>
    

    Replace your-domain.com with your actual domain or server IP.

  3. Enable the new site and the rewrite module:
    sudo a2ensite microweber.conf
    sudo a2enmod rewrite
    sudo systemctl reload apache2
    

Nginx Configuration

  1. Create a new server block file:
    sudo nano /etc/nginx/sites-available/microweber.conf
    
  2. Add server block configuration:
    server {
        listen 80;
        server_name your-domain.com;
        root /var/www/html/microweber;
    
        index index.php index.html index.htm;
    
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }
    
        location ~ \.php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        }
    
        location ~ /\.ht {
            deny all;
        }
    }
    
  3. Activate the site:
    sudo ln -s /etc/nginx/sites-available/microweber.conf /etc/nginx/sites-enabled/
    sudo systemctl reload nginx
    

At this point, your web server is ready to serve Microweber’s files.

Step 7: Complete Installation via Web Interface

With Microweber’s files in place and your web server configured, it’s time for the graphical installation wizard. Open your browser and navigate to http://your-domain.com or http://server-ip.

The setup wizard will ask for:

  • Database Name: microweber_db
  • Database User: microweber_user
  • Password: The strong password you created.
  • Admin Details: Create your admin username, email, and secure password.

Once you enter these values, click the Install or Continue button. Microweber will run its setup routine, populate database tables, and configure essential settings. The process usually completes within a minute or two.

After successful installation, you’ll gain access to the Microweber admin panel. This panel allows you to create or modify pages, products, and modules using an intuitive drag-and-drop interface.

Step 8: Post-installation Configuration

Securing your newly installed site and increasing its performance are essential for a stable production environment.

Enable HTTPS Encryption

An SSL/TLS certificate secures data transfers, boosting trust and search engine rankings. You can get a free SSL certificate from Let’s Encrypt and configure it using certbot.

sudo apt install certbot python3-certbot-apache

If using Apache, run:

sudo certbot --apache

If using Nginx:

sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx

Follow certbot prompts to complete the SSL setup. A successful configuration automatically renews certificates, ensuring ongoing security.

Regular Backups

Microweber includes a built-in backup tool for exporting site data. You can also create MySQL/MariaDB backups using:

mysqldump -u microweber_user -p microweber_db > /path/to/microweber_backup.sql

Storing backups offsite (e.g., cloud storage) is a recommended practice.

Update Microweber

Occasionally check for updates in the Microweber admin dashboard or from its GitHub page. Updates often bring security patches and new features.

Troubleshooting Common Issues

Even a well-planned installation can include challenges. Here are quick tips to fix common problems:

  1. Permission Errors: If you face “Permission Denied” or “Cannot write file,” confirm that the www-data (Apache) or nginx (Nginx) user owns the Microweber directory. Check permissions again:
    sudo chown -R www-data:www-data /var/www/html/microweber
    sudo chmod -R 755 /var/www/html/microweber
    
  2. Database Connection Failures: Confirm that the credentials in Microweber’s .env or setup match the database name, user, and password you created. Make sure MariaDB or MySQL service is running:
    sudo systemctl status mariadb
    
  3. PHP Version Incompatibilities: If you see fatal errors related to PHP functions, ensure you have the necessary extensions (like mbstring, zip, xml). Confirm correct version:
    php --version
    
  4. SSL/HTTPS Issues: After enabling HTTPS, if your site doesn’t load securely, verify certbot configuration or examine your Apache/Nginx config files for any duplicate or conflicting settings. You may also check firewall rules or DNS records.

Congratulations! You have successfully installed Microweber. Thanks for using this tutorial for installing Microweber CMS on Ubuntu 24.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official Microweber website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button