Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk11 min

How to Install ProcessWire on an Ubuntu VPS (Apache, PHP and MySQL)

Set up ProcessWire on Ubuntu with Apache, PHP, MySQL or MariaDB, rewrite rules and a secure virtual host. This guide covers ZIP, Git and Composer deployments, installer cleanup, permissions, TLS, backups and fixes for 404, 500, database and upload errors.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The reliable production path is to run ProcessWire behind Apache with PHP 8.x, create a dedicated MySQL or MariaDB database, enable mod_rewrite and .htaccess overrides, then complete the browser installer. On a new Ubuntu VPS, plan for package updates, SSH and firewall hardening, TLS, backups and monitoring as well as the application itself. This guide covers the prerequisites, three official installation methods, Apache configuration, permissions, cleanup and the fixes for the common “homepage works but internal URLs fail” problem.

What ProcessWire needs on an Ubuntu VPS

ProcessWire requires an Apache-compatible web server, PHP (8.x is recommended), PDO database support, MySQL 5.6 or newer or an equivalent MariaDB release, Apache rewrite support with working .htaccess files, and either PHP GD2 or ImageMagick for image handling. The mbstring extension is recommended. Apache is the officially supported web server; nginx can be used only when you reproduce the required rewrite and security rules yourself.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Component Requirement or recommendation What to verify
Operating system Supported Ubuntu release with current security updates lsb_release -a and successful package updates
Web server Apache 2 with mod_rewrite and AllowOverride enabled for the site apache2ctl -M | grep rewrite
PHP PHP 8.x recommended php -v
Database MySQL 5.6+ or a compatible MariaDB release Server version and a login using the new application account
PHP database access PDO with the MySQL driver php -m | grep -E 'PDO|pdo_mysql'
Image processing GD2 or ImageMagick php -m | grep -E 'gd|imagick'
Text handling mbstring recommended php -m | grep mbstring
Privileges SSH account with sudo access during setup sudo -v

Choose the ProcessWire release and deployment method

Use the master release channel for a production site. The ProcessWire download page reported master 3.0.259 and dev 3.0.274 when checked; those numbers are time-sensitive, so confirm the current download page immediately before downloading. The dev channel is for people who deliberately need unreleased changes and can accept more change between updates.

Method Initial deployment Version control and repeatability Best fit
ZIP archive Download, extract into the document root and open the site URL You must record the archive version and manage later replacements yourself A straightforward single VPS or a first installation
Git Clone the repository into the intended web root Convenient for source-controlled deployments and explicit commits Operators already using Git-based release workflows
Composer Run composer create-project processwire/processwire Supports projects that already manage PHP dependencies with Composer A codebase organized around Composer

All three methods are official. None is universally best: ZIP minimizes moving parts, Git fits a repository workflow, and Composer is most natural when dependency management is already part of the project.

Prepare Ubuntu and secure basic network access

Log in and update packages

Use a sudo-capable account rather than running the application as root. Replace the example host name in later commands with the domain that will point to this VPS.

ssh [email protected]
sudo apt update
sudo apt full-upgrade -y

Reboot if the package manager reports that the running kernel or core services require it, then reconnect over SSH.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure the firewall before exposing the web server

Ubuntu’s UFW can allow SSH and the two web ports while leaving other inbound services closed. If your provider supplies an external firewall, apply equivalent rules there as well.

sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status verbose

Do not enable the firewall until you have confirmed that the SSH rule matches the port and source you actually use; otherwise you can lock yourself out.

Install Apache, PHP, the database driver and image support

Ubuntu package names track the release’s supported PHP version. The following installs the common Apache and PHP packages; if your Ubuntu release names a versioned package differently, use its supported equivalent and verify the resulting modules.

sudo apt install -y apache2 mysql-server php libapache2-mod-php php-mysql php-mbstring php-gd php-xml unzip git

ImageMagick is an alternative to GD. Install it, together with the PHP binding, when that is your preferred image stack and the packages are available for the Ubuntu release:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo apt install -y imagemagick php-imagick

Composer is needed only for the Composer deployment route:

sudo apt install -y composer

Enable Apache rewrite support and restart Apache after the PHP packages are in place:

sudo a2enmod rewrite
sudo systemctl enable --now apache2 mysql
sudo systemctl restart apache2

Check the actual PHP build rather than assuming the package installed every extension:

php -v
php -m | grep -E 'PDO|pdo_mysql|mbstring|gd|imagick'
apache2ctl -M | grep rewrite
sudo systemctl --no-pager --full status apache2 mysql

You need pdo_mysql, and at least one of gd or imagick. If an expected module is absent, install the matching Ubuntu package, restart Apache and run the checks again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create a dedicated database and least-privilege account

Do not give the web application a general-purpose administrative database login. Create one database and one account used only by this ProcessWire installation. The following example uses database name processwire and account name processwire_app; choose a long unique password and keep it in your password manager.

sudo mysql
CREATE DATABASE processwire CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'processwire_app'@'localhost' IDENTIFIED BY 'use-a-long-unique-password';
GRANT ALL PRIVILEGES ON processwire.* TO 'processwire_app'@'localhost';
FLUSH PRIVILEGES;
EXIT;

The grant is limited to the new database, not to every database on the server. Record the database name, host (localhost in this example), user and password; the browser installer will request them.

Create the Apache virtual host

Create the document root

sudo mkdir -p /var/www/processwire
sudo chown -R $USER:www-data /var/www/processwire
sudo chmod 755 /var/www/processwire

The ownership shown is a workable starting point for copying files as your administrative user. You will refine ownership and write access after installation so that Apache can write only where ProcessWire needs it.

Write a site-specific virtual-host file

Create /etc/apache2/sites-available/processwire.conf with a text editor and use the domain that will resolve to the VPS:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/processwire

    <Directory /var/www/processwire>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    DirectoryIndex index.php index.html
    ErrorLog ${APACHE_LOG_DIR}/processwire-error.log
    CustomLog ${APACHE_LOG_DIR}/processwire-access.log combined
</VirtualHost>

AllowOverride All is important because ProcessWire’s root .htaccess contains its rewrite and access rules. Without it, Apache may serve the homepage but fail to route page URLs correctly.

Enable and test the host

sudo a2ensite processwire.conf
sudo a2dissite 000-default.conf
sudo apache2ctl configtest
sudo systemctl reload apache2

The configuration test must report Syntax OK. If it does not, fix the reported directive before continuing. Ensure the DNS A or AAAA record for the domain points to the VPS before using the browser installer.

Put ProcessWire in the document root

ZIP installation

Download the current master ZIP from ProcessWire’s official download page on your local computer or the VPS, then copy it to the server. Extract it directly into /var/www/processwire; avoid creating an extra nested directory such as /var/www/processwire/processwire-master.

scp processwire-master.zip [email protected]:/tmp/
ssh [email protected]
sudo unzip /tmp/processwire-master.zip -d /var/www/processwire

If the archive itself contains a top-level directory, move that directory’s contents up one level so that index.php, .htaccess, wire and site are immediately inside the configured document root.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Git installation

Clone the official repository into the empty document root:

sudo rm -rf /var/www/processwire/*
sudo git clone https://github.com/processwire/processwire.git /var/www/processwire

For production, check out the release or commit you have approved rather than deploying an unreviewed moving branch. Keep the working tree and your update procedure under source control.

Composer installation

From the intended web-root directory, run the official create-project command:

cd /var/www
sudo composer create-project processwire/processwire processwire

Composer may create files owned by root when run with sudo. Correct the resulting ownership before opening the installer, and use a deployment process that records the resolved dependency versions.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run the browser installer

Open the domain in a browser. ProcessWire’s installer checks the server environment and then asks for the database connection, site profile, administrator account and other setup values.

  1. Choose the installation profile that matches the site you intend to build.
  2. Enter the database name, host, user and password created earlier. Keep the host consistent with the account definition; localhost and a network address can be treated differently by MySQL authentication.
  3. Create a strong administrator name and password. Do not reuse the database password.
  4. Review the installer’s PHP and filesystem warnings. Resolve missing extensions or write permissions before proceeding instead of ignoring them.
  5. Complete the installation and sign in to the administrator area to confirm that pages, templates and assets load.

During setup, ProcessWire writes its database settings to site/config.php and creates the site asset structure. The installation is not finished until the cleanup and permission steps below are complete.

Remove installer files and tighten permissions

Delete setup entry points

After a successful installation, remove the installer script and installation directory from the ProcessWire root:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cd /var/www/processwire
sudo rm -f install.php
sudo rm -rf site/install

Leaving these files available creates an unnecessary setup surface and can allow an accidental reinstall attempt.

Protect the configuration file

site/config.php contains database credentials. ProcessWire’s security guidance identifies it as the file that must not be readable by unrelated system users, other than the operator and Apache. Confirm its owner and mode:

sudo chown www-data:www-data /var/www/processwire/site/config.php
sudo chmod 640 /var/www/processwire/site/config.php

If your deployment model uses a different Apache user or a shared administrative group, use that model instead; the requirement is that the web process can read the file while other users cannot.

Allow writes only where ProcessWire needs them

ProcessWire commonly needs to write under site/assets for uploaded files, generated images, caches and logs. Grant the web process access to the required directories, then keep code and configuration read-only where possible. A possible baseline is 755 for directories and 644 for regular files, provided those modes match your ownership model. Do not use broad 777 directory or 666 file permissions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo find /var/www/processwire -type d -exec chmod 755 {} ;
sudo find /var/www/processwire -type f -exec chmod 644 {} ;
sudo chown -R www-data:www-data /var/www/processwire/site/assets

Run the file-mode commands only after you have verified which account performs deployments. If your deployment user must update code, use a shared group or a release-and-symlink workflow rather than making the entire tree writable by Apache.

Finish production hardening

  • Install a TLS certificate and redirect HTTP to HTTPS once DNS resolves correctly.
  • Keep Ubuntu, Apache, PHP, the database server and ProcessWire updated on a planned schedule. Review release notes before changing the production channel.
  • Use SSH keys, disable password authentication after verifying key access, and restrict SSH exposure where your environment permits it.
  • Back up the database and the ProcessWire site directory, especially uploaded assets and configuration. Test restoring a backup rather than assuming that a completed job is usable.
  • Monitor disk space, memory, Apache and database service health, TLS expiry and application error logs.
  • Do not leave verbose PHP or ProcessWire debugging enabled on a public production site.

A VPS provides an isolated, dedicated environment suitable for production, but it does not provide automatic patching, backups, TLS or monitoring. Those remain the operator’s responsibility.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot the common installation failures

The homepage works but internal URLs return 404

This almost always points to Apache not applying ProcessWire’s rewrite rules. Confirm that the virtual host’s <Directory> block points to the same directory as DocumentRoot and contains AllowOverride All. Confirm the module and reload Apache:

apache2ctl -M | grep rewrite
sudo apache2ctl configtest
sudo systemctl reload apache2

Check that the root .htaccess file exists and was not omitted when extracting the archive. In configurations where Apache serves the site from a subdirectory, review ProcessWire’s annotated .htaccess directives and set an appropriate RewriteBase rather than copying a rule blindly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Changing .htaccess produces HTTP 500

Read the Apache error log immediately after reproducing the error:

sudo tail -n 50 /var/log/apache2/processwire-error.log
sudo journalctl -u apache2 -n 50 --no-pager

Restore the last known-good .htaccess, then test one directive change at a time. A syntax error, an unsupported directive or an override that is not permitted can all produce a 500 response. Always run apache2ctl configtest after editing the virtual-host file.

A blank page or unexpected application error appears

Temporarily enable an appropriate ProcessWire debug level while the site is inaccessible only to trusted administrators, reproduce the error, and inspect /site/assets/logs/errors.txt. Also inspect the Apache and PHP logs. Disable verbose debugging as soon as you have the diagnosis; production visitors should not receive stack traces, file paths or database details.

The installer reports that it cannot write files

Check the owner, group and mode of site/assets, its subdirectories and the configuration file. The account running Apache must be able to create the directories and files ProcessWire needs during installation. After the installer succeeds, remove unnecessary write access and keep site/config.php unreadable to unrelated users.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
namei -l /var/www/processwire/site/assets
ls -ld /var/www/processwire/site /var/www/processwire/site/assets
ls -l /var/www/processwire/site/config.php

The database connection fails

Verify that MySQL or MariaDB is running, that the PHP driver is loaded, and that the credentials work independently of ProcessWire:

sudo systemctl status mysql --no-pager
php -m | grep pdo_mysql
mysql -u processwire_app -p -h localhost processwire

Check for a spelling mismatch between the installer and the SQL account, and make sure the account host (localhost in the example) matches the host used to connect.

Images fail to upload or resize

Confirm that GD or ImageMagick is loaded in the PHP environment Apache uses, not only in a separate command-line PHP installation. Verify write access to site/assets, then restart Apache after installing or changing a PHP extension.

Post-install verification checklist

  • The domain resolves to the VPS and Apache serves the intended virtual host.
  • The homepage and several nested ProcessWire page URLs load without 404 responses.
  • The administrator can log in and create or edit a test page.
  • An image upload and thumbnail operation succeed.
  • site/config.php is not readable by unrelated users.
  • install.php and site/install/ are gone.
  • Apache rewrite support is enabled and the site remains healthy after a service restart.
  • HTTPS, backups, firewall rules, updates and monitoring are in place before public launch.

Which installation route should you use?

For one Ubuntu VPS with no existing deployment automation, use the current master ZIP and record its version. Choose Git when deployments are reviewed and promoted from a repository. Choose Composer when the ProcessWire project already has a Composer-based dependency and release workflow. Whichever route you choose, the operational requirements are the same: Apache must honor .htaccess, PHP must expose PDO and image support, the database account must be dedicated, and the installer files and configuration must be secured after setup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.