Install ProcessWire on Ubuntu 22.04

|
Last Updated:
|
|

Follow through this guide to install ProcessWire on Ubuntu 22.04. ProcessWire is an opensource PHP based content management system and framework.

Install ProcessWire on Ubuntu 22.04

ProcessWire is PHP based application and thus, it requires LAMP/LEMP stack to run. We use LAMP stack in this setup.

Run system update

Update your system package cache;

apt update

Install Apache Web Server on Ubuntu 22.04

Run the command below to install Apache web server on Ubuntu 22.04;

apt install apache2 -y

Install MariaDB on Ubuntu 22.04

ProcessWire requires MySQL or MariaDB, 5.0.15 or greater. By default, Ubuntu 22.04 provides MariaDB 10.5 in its default repos.

Hence, execute the command below to install MariaDB;

apt install mariadb-{server,client} -y

Create Database and Database user for ProcessWire CMS

Once the installation of MariaDB is done, run the first initial script to remove test databases, disable remote root login, remove test users

mysql_secure_installation

Next, login to the MariaDB and create the database and database user for ProcessWire CMS;

mysql -u root -p

Replace the username/password and name of the database accordingly;

create database pwirecmsdb;
grant all on pwirecmsdb.* to pwiredamin@localhost identified by 'PASSWORD';

Reload table privileges and exit the database;

flush privileges;
quit

Install PHP and Other Required PHP Modules for ProcessWire CMS

PHP 8.x is the default PHP version available on Ubuntu 22.04 repisitories.

In this setup, we will use PHP 7.4.

To install PHP 7.4 on Ubuntu 22.04;

add-apt-repository ppa:ondrej/php --yes &> /dev/null
sed -i 's/jammy/focal/' /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
apt update

Next, Install PHP and required modules for ProcessWire CMS and other required packages;

apt install php7.4 php7.4-{mysql,gd,zip} libapache2-mod-php7.4 -y git

Download ProcessWire CMS Installer

There are different methods in which you can install ProcessWire CMS tool; Via ZIP file, install from Github, using composer, e.t.c.

We use the Github installation method in this guide.

Thus, clone the ProcessWire Github repository to your web root directory, we use /var/www/html/processwire, in this example setup.

git clone https://github.com/processwire/processwire.git /var/www/html/processwire

Set the proper ownership of the ProcessWire web root directory;

chown -R www-data: /var/www/html/processwire

Create Apache Site Configuration for ProcessWire

Next, create Apache site configuration for ProcessWire.

Simply, copy and paste the command below to create the configuration. Be sure to make appropriate changes as per your environment setup.

tee /etc/apache2/sites-available/processwire.conf << 'EOL'
<VirtualHost *:80>
    ServerName cms.kifarunix-demo.com
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/processwire

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/html>
        Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Require all granted
    </Directory>
</VirtualHost>
EOL

Check Apache configuration syntax;

apachectl -t

If the sample output is Syntax OK. then you are good.

Disable Default Apache site config;

a2dissite 000-default.conf

Enable Apache’s ProcessWire site config;

a2ensite processwire.conf

Enable Required ProcessWire Apache Rewrite Modules

a2enmod rewrite

Restart Apache Web service;

systemctl restart apache2

Install ProcessWire CMS on Ubuntu

Next, you need to finalize the installation of ProcessWire CMS on Ubuntu 22.04 via the browser.

Open Apache ports on Firewall to allow external access.

If you are using UFW;

ufw allow "Apache Full"

Then access your ProcessWire system via the address http://<domain-name>.

You are welcomed by setup page;

Install ProcessWire on Ubuntu 22.04

Click Get Started to proceed.

Select Installation Profile and proceed with the setup.

Install ProcessWire on Ubuntu 22.04

Ensure all the ProcessWire PHP modules are met.

processwire php modules check

Next, define the database connection settings as created above and set the timezone.

db connections tz

Ensure the File permissions are set correctly. As well as the site hostname.

You can choose to enable/disable debug mode depending on whether it is a live or development site.

Install ProcessWire on Ubuntu 22.04

If you get an error that the database has some existing tables, you can choose to remove them and proceed.

Set the Admin URL and Account Credentials;

processwire admin account

Clean up the directories and files listed below are no longer needed and continue.

Install summary;

install summary

Login to Admin Panel

processwire admin interface

View Sample ProcessWire Site

processwire minimal site

And there you go. You can now use ProcessWire to develop your sites as you so wish. That concludes our guide on how to install ProcessWire CMS on Ubuntu 22.04.

Read more on Getting started with ProcessWire.

Reference

Installing ProcessWire CMS

Other Tutorials

Install latest WordPress with LAMP Stack on Ubuntu 20.04

Install Automad CMS on Debian 10/Ubuntu 18.04

Install WonderCMS with Nginx on Debian 10

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment