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.
Update your server.
Create a non-root sudo account.
Install a LAMP stack.
Optionally, you could deploy a Vultr One-Click LAMP server.
Log in to your server as a non-root user with sudo access.
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:
Copy the download link for the ProcessWire Master version.
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.
Choose an installation profile and click Continue
.
Verify all compatibility checks succeed, then click Continue To Next Step.
Enter the MySQL database information.
DB Name: processwire_db
DB User: processwire_user
DB Pass: your_secure_password
DB Host: localhost
DB Port: 3306
DB Charset: utf-8
DB Engine: MyISAM
Select your time zone.
Leave file permissions at the default of 755
for directories and 644
for files.
If you have a DNS hostname, enter it in the hostname section. You can enter multiple names, one host per line. Otherwise, leave the IP address as the hostname.
Set Debug Mode to Disabled
for production. Development servers should enable debug mode.
Click Continue
to proceed.
Leave the admin login URL at the default value, processwire
.
Enter your admin username, password, and email address.
Leave the Cleanup options checked, and click Continue.
Click Login To Admin to begin using 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
Please review your file permissions by following this guide.
See the full ProcessWire Documentation to learn more.