How to install ProcessWire on Ubuntu 20.04?

Overview

ProcessWire is an open-source CMS (content management system) built on PHP that has simple functionality for both programmers as well as end users.

This tutorial demonstrates how to install ProcessWire on Ubuntu 20.04.

Prerequisites

There are certain prerequisites that need to be met before you begin.

  • A server running Ubuntu version 20.04.

  • Non-root sudo user privileges.

  • Updated Ubuntu 20.04 server.

Get Started

Step 1: Set up Apache

  • Use non-root user account with sudo access to log into your server.

  • Use the a2enmod tool to enable module.

sudo a2enmod rewrite
  • Now, restart Apache.

sudo systemctl restart apache2
  • Modify the Apache host configuration's default settings.

sudo nano /etc/apache2/sites-enabled/000-default.conf
  • Ensure that DocumentRoot directive redirects to the /var/www/html.

  • Insert the following block of code just before the closing </VirtualHost> statement.

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
</Directory>
  • Save the file by pressing CTRL+O, and then close it by CTRL+X.

  • When the server restarts, use systemctl command to launch Apache automatically.

sudo systemctl enable apache2
  • Launch Apache web server.

sudo systemctl start apache2

Step 2: Make a ProcessWire database

  • Access the MySQL database by logging in as the root user.

sudo mysql -u root -p
  • Create a user and database for ProcessWire. In the below example, substitute your_secure_password with your own actual password.

mysql> CREATE USER 'processwire_user'@'localhost' IDENTIFIED BY 'your_secure_password';
mysql> CREATE DATABASE processwire_db;
mysql> GRANT ALL PRIVILEGES ON processwire_db.* TO 'processwire_user'@'localhost';
mysql> FLUSH PRIVILEGES;
  • Quit MySQL.

QUIT;

Step 3: Installing ProcessWire

  • Go to your web root directory:

cd /var/www/html
  • Remove the file index.html.

sudo rm index.html
  • Download the ProcessWire installation package.

sudo wget https://github.com/processwire/processwire/archive/master.zip
  • Install unzip in order to extract the installation package.

sudo apt install unzip -y
  • Unpack ProcessWire installation package.

sudo unzip master.zip
  • Transfer the files to root directory of the web and remove any temporary files.

sudo mv processwire-master/* /var/www/html
sudo rm -rf processwire-master/
sudo rm master.zip
  • Modify ownership of the file to "www-data" user.

sudo chown -R www-data:www-data *.
  • Relaunch Apache.

sudo systemctl restart apache2
  • Open your preferred web browser and go to your server’s IP address as shown below:

http://your_server_IP
  • Select Get Started.

  • Choose an installation profile and proceed by clicking the Continue button.

  • Ensure that all compatibility checks are successful, then proceed to the next step by clicking on the Continue to Next Step button.

  • Provide the necessary MySQL database details as shown in the figure:

  • Select Continue.

  • Enter your admin credentials.

  • Press the Login button in order to start using ProcessWire.

Conclusion

We have successfully demonstrated how to install ProcessWire on Ubuntu 20.04.

Last updated