ProcessWire is a PHP-based open-source content management system with intuitive features for both developers and end-users. This guide explains how to install ProcessWire on Ubuntu 20.04 LTS VPS with a LAMP stack.
ProcessWire must be installed on a LAMP server. Follow these steps before you begin.
Optionally, you could deploy a Vultr One-Click LAMP server.
ProcessWire requires the Apache mod_rewrite
module. To enable the module, use the a2enmod
utility, then restart Apache.
$ sudo a2enmod rewrite
$ sudo systemctl restart apache2
Edit the default Apache host configuration.
$ sudo nano /etc/apache2/sites-enabled/000-default.conf
Verify the DocumentRoot
directive points to /var/www/html
.
Paste the following block before the final </VirtualHost>
statement.
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
The file should look like this after you finish.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
Save and exit the file.
Use the systemctl
command to start Apache automatically when the server restarts.
$ sudo systemctl enable apache2
Start the Apache web server.
$ sudo systemctl start apache2
Log in to MySQL as root.
$ sudo mysql -u root -p
Create the ProcessWire database and user. Replace your_secure_password
in the example below with a strong 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;
Exit MySQL.
mysql> QUIT;
Change to your web root directory:
$ cd /var/www/html
Remove the index.html
file.
$ sudo rm index.html
Launch your browser and navigate to the ProcessWire download page:
Return to your terminal session and download the installation package.
$ sudo wget https://github.com/processwire/processwire/archive/master.zip
Install unzip, which is required to extract the installation package.
$ sudo apt install unzip -y
Extract the ProcessWire installation package.
$ sudo unzip master.zip
Move the files to the web root folder and clean up the temporary files.
$ sudo mv processwire-master/* /var/www/html
$ sudo rm -rf processwire-master/
$ sudo rm master.zip
Change the file ownership to the www-data
user.
$ sudo chown -R www-data:www-data * .
Restart Apache.
$ sudo systemctl restart apache2
Open your browser and navigate to the server's IP address, for example:
http://192.0.2.123
Click Get Started
to begin.
Continue
.Enter the MySQL database information.
Select your time zone.
755
for directories and 644
for files.Disabled
for production. Development servers should enable debug mode.Continue
to proceed.processwire
.Enable the firewall and allow HTTP (TCP port 80) and SSH (TCP port 22).
$ sudo ufw allow 80/tcp
$ sudo ufw allow 22/tcp
$ sudo ufw enable