Knowledgebase

How to Install ProcessWire on Ubuntu 20.04 Print

  • 0

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.

Requirements

ProcessWire must be installed on a LAMP server. Follow these steps before you begin.

Optionally, you could deploy a Rcs One-Click LAMP server.

1. Configure Apache

  1. Log in to your server as a non-root user with sudo access.

  2. 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
  3. Edit the default Apache host configuration.

      $ sudo nano /etc/apache2/sites-enabled/000-default.conf
  4. Verify the DocumentRoot directive points to /var/www/html.

  5. 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>
  6. Save and exit the file.

  7. Use the systemctl command to start Apache automatically when the server restarts.

     $ sudo systemctl enable apache2
  8. Start the Apache web server.

     $ sudo systemctl start apache2

2. Create the ProcessWire Database

  1. Log in to MySQL as root.

     $ sudo mysql -u root -p
  2. 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;
  3. Exit MySQL.

     mysql> QUIT;

3. Install ProcessWire

  1. Change to your web root directory:

     $ cd /var/www/html
  2. Remove the index.html file.

     $ sudo rm index.html
  3. Launch your browser and navigate to the ProcessWire download page:

  4. Copy the download link for the ProcessWire Master version.

  5. Return to your terminal session and download the installation package.

     $ sudo wget https://github.com/processwire/processwire/archive/master.zip
  6. Install unzip, which is required to extract the installation package.

     $ sudo apt install unzip -y
  7. Extract the ProcessWire installation package.

     $ sudo unzip master.zip
  8. 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
  9. Change the file ownership to the www-data user.

     $ sudo chown -R www-data:www-data * .
  10. Restart Apache.

     $ sudo systemctl restart apache2
  11. Open your browser and navigate to the server's IP address, for example:

     http://192.0.2.123
  12. Click Get Started to begin.

  13. Choose an installation profile and click Continue.

  14. Verify all compatibility checks succeed, then click Continue To Next Step.

  15. 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
  16. Select your time zone.

  17. Leave file permissions at the default of 755 for directories and 644 for files.

  18. 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.

  19. Set Debug Mode to Disabled for production. Development servers should enable debug mode.

  20. Click Continue to proceed.

  21. Leave the admin login URL at the default value, processwire.

  22. Enter your admin username, password, and email address.

  23. Leave the Cleanup options checked, and click Continue.

  24. Click Login To Admin to begin using ProcessWire.

(Optional) Configure the Firewall

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

More Information

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. Requirements ProcessWire must be installed on a LAMP server. Follow these steps before you begin. Deploy an Ubuntu 20.04 LTS Rcs cloud server instance. Update your server. Create a non-root sudo account. Install a LAMP stack. Optionally, you could deploy a Rcs One-Click LAMP server. 1. Configure Apache 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 statement. Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all Require all granted The file should look like this after you finish. ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all Require all granted 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 2. Create the ProcessWire Database 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; 3. Install ProcessWire 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. (Optional) Configure the Firewall 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 More Information Please review your file permissions by following this guide. See the full ProcessWire Documentation to learn more.

Was this answer helpful?
Back

Powered by WHMCompleteSolution