How to Install BoltWire CMS on AlmaLinux 9 and Rocky Linux 9
Set up BoltWire, a PHP CMS that needs no database, on AlmaLinux 9 or Rocky Linux 9 with Apache, PHP-FPM and the right SELinux labels, then create your first site.
BoltWire is a free content management system written in PHP that stores its pages in files, so it needs a web server with PHP and nothing else. This guide installs BoltWire 8.00 on AlmaLinux 9 or Rocky Linux 9 (the steps are the same on CentOS Stream 9 and RHEL 9) with Apache, and ends with your first site created and its admin account claimed.
CentOS 7 reached end of life on 30 June 2024 and no longer receives security updates; AlmaLinux 9 and Rocky Linux 9 are its community successors and use the same dnf, firewalld and SELinux tooling.
A note on the project's pace: BoltWire 8.00, released on 4 July 2022, is the newest version on the official download page, and the site does not state which PHP versions it has been tested with. Keep that in mind before you build something important on it.
Requirements
- A server running AlmaLinux 9 or Rocky Linux 9 and a user with
sudorights. - A domain name or the server's IP address. The examples use
example.com. - No database. BoltWire's installation page lists only PHP and web space as requirements.
Install Apache and PHP
sudo dnf install -y httpd php unzip policycoreutils-python-utils
On the RHEL 9 family, PHP runs through PHP-FPM, which the php package pulls in together with the Apache configuration for it. Enable and start both services:
sudo systemctl enable --now httpd php-fpm
The default PHP version in these distributions is 8.0. Newer versions are available as module streams, which you can list with dnf module list php; because BoltWire does not publish a supported PHP range, test your site after any PHP change.
Open the firewall for web traffic:
sudo firewall-cmd --permanent --add-service=http --add-service=https
sudo firewall-cmd --reload
Browsing to http://example.com/ should now show the distribution's Apache test page.
Download and unpack BoltWire
The official download page links to a zip archive. Fetch it into the web root and unpack it:
cd /var/www/html
sudo curl -fLO https://www.boltwire.com/files/8/boltwire8.00.zip
sudo unzip boltwire8.00.zip
sudo rm boltwire8.00.zip
If the project has published a newer version, take the link from the BoltWire downloads page instead. The archive unpacks into a directory named boltwire, which holds the engine. Each site you create later gets its own directory next to it, not inside it, so /var/www/html itself must be writable for the web server.
Set ownership and SELinux labels
Apache and PHP-FPM run as the user apache. Hand the web root to that user:
sudo chown -R apache:apache /var/www/html
SELinux is enforcing by default and lets the web server only read files under /var/www/html. BoltWire has to create directories and write page files there, so label the tree as writable web content and apply the label:
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html(/.*)?"
sudo restorecon -Rv /var/www/html
Do not disable SELinux to get past a permission error; the label above is the supported way to allow writes.
Create your first site
- Open
http://example.com/boltwire/start.php. A "Welcome to BoltWire" screen asks for a system password. - Set the system password straight away and store it safely. It is what stops other people from creating sites on your server, and you need it for every site you add.
- Enter a short site name such as
mysite, enter the system password again and click Create Site. BoltWire creates/var/www/html/mysiteand shows a link to it. - Open
http://example.com/mysiteand click JOIN in the menu to create the admin account with an e-mail address and password. Do this before anyone else can. - In the site's admin area, work through the Site Checklist.
You can repeat steps 3 to 5 to run several sites from one BoltWire installation.
Verify and secure the installation
- Check the modes BoltWire's documentation expects:
0755on theboltwiredirectory and its subdirectories, and0644on each site'sindex.php. The documentation suggests0777for site directories on shared hosting; here the directories belong toapache, so0755is enough and safer. - Serve the site over HTTPS before you log in from untrusted networks. Passwords entered on
start.phpand on the login form are otherwise sent in clear text. A standard Apache TLS virtual host with a Let's Encrypt certificate is all it takes; BoltWire needs no special configuration for it. - Back up by copying
/var/www/html. With no database, that directory is the entire site:sudo tar -czf /root/boltwire-backup.tar.gz -C /var/www html.
Troubleshooting
- start.php shows PHP source or downloads. PHP-FPM is not running or Apache was started before PHP was installed. Run
sudo systemctl restart php-fpm httpd. - "Create Site" fails or the site directory is missing. The web root is not writable. Re-run the
chownandrestoreconcommands and look for denials withsudo ausearch -m avc -ts recent. - Pages save on one site but not another. A site directory was copied in as
root. Fix it withsudo chown -R apache:apache /var/www/html/mysitefollowed bysudo restorecon -R /var/www/html/mysite.
Frequently asked questions
Does BoltWire need MySQL or MariaDB?
No. Its installation page states that no database is required; all content is stored as files in the site directory.
Can I serve a site from the domain root instead of /mysite?
The site directory is an ordinary directory beside boltwire, so you can point an Apache virtual host's DocumentRoot at /var/www/html/mysite. Keep the boltwire directory where it is, because the site's index.php refers to it, and check BoltWire's documentation for the related URL settings.
Is BoltWire related to Bolt CMS?
No. Bolt CMS is a separate, Symfony-based project that needs Composer and normally a database. BoltWire is a standalone flat-file engine.
Should I leave start.php in place?
It is how you add further sites, and it is protected by the system password once you have set one. That is why setting the password is the first thing to do after unpacking; an installation left without one lets any visitor create sites.