Hello I’m french and I installed wordpress on my freedombox this way because I already know a little and there are a lot of tutorials. If there is a problem because dangerous, I delete the post. prepare apache2 sudo apt install php libapache2-mod-php mariadb-server php-mysql
restart sudo systemctl restart apache2 prepare mariadb sudo mysql_secure_installation
enter Enter
enter Yes
enter NEW PASSWORD
confirm NEW PASSWORD
enter Yes
enter Yes
enter Yes
enter Yes
create database wordpress sudo mysql CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'USER'@'localhost' IDENTIFIED BY 'PASSWORD';
adapt USER and PASSWORD FLUSH PRIVILEGES; QUIT; prepare wordpress sudo apt install unzip wget https://fr.wordpress.org/wordpress-latest.zip sudo unzip wordpress-latest.zip -d /var/www/html sudo chown www-data:www-data /var/www/html/wordpress -R sudo chmod -R -wx,u+rwX,g+rX,o+rX /var/www/html/wordpress set up apache2 sudo nano /etc/apache2/sites-available/010-wordpress.conf
I posted this to a thread of my own, but I’m wondering if it would be helpful here. This was my own hacky way of getting WordPress to act as the root website on my FBX install. I know how to make WP work, but I’m not familiar with FBX enough to recommend doing it this way on a production system.
From my notes on making WP work as default www page.
That’s actually something I wanted to bring up with someone more knowledgeable than I am…I made WP work by editing config files without knowing exactly what else that would affect.
Before you do this, try taking a snapshot of the /etc/apache2/ directory. The install disables some of the configs and vhosts, causing FBX to lose functionality. So make sure you know what’s already configured.
After the install, check /etc/apache2/sites-enabled, mods-enabled, and confs-enabled to ensure that everything that was there before is still there. If not, use sudo a2ensite, a2enmod, and a2enconf to make it match.
Before restarting Apache, edit the default vhost site config (000-default.conf) and point the document root directive to your wordpress directory. Here is my working VirtualHost *:80 config:
Edit the file /etc/apache2/conf-available/freedombox-apache-homepage.conf and comment out the first line, RedirectMatch "^/$" "/index.html" with two hashtags like this: ## RedirectMatch "^/$" "/index.html". You have to comment it instead of using a2disconf on the whole config or FBX fixes itself and makes /plinth your default site.
Now restart apache with sudo systemctl apache2 reload.
It’s super helpful to change the owner/group of the WP html directory and its contents to www-data. WP will help you add and edit files in your installation if it has filesystem access with write permissions.
You’ll need to install the Apache library for Certbot and get a cert using the command line. I found instructions on the EFF site, but they only work if you change the python version to 3 like this: sudo apt-get install certbot python3-certbot-apache
Then run: sudo certbot --apache
and it will pick up your new domain as a candidate for requesting a certificate. You can’t use the built-in Certbot UI from FBX.
This also creates the apache2 site conf file for port 443.
I’ve pulled these directions from my notes, so I may have left out some minor details. Let me know if you run into any trouble. Configuring WP to run in just about any server setup is my thing, so I’m sure I can help.