The password text file located in/root
contains the WordPress site administrator password for MariaDB. With this update, the installation script backs the password file up to the WordPress site root.
If you've used a previous version of this script, you may need to take action. Consider the following scenario:
You regularly back up the datasets for your WordPress sites, but you haven't backed up the password files in/root
. If you lose the system, you may be able to restore the WordPress sites, but, without the password files, you will no longer have administrator access to MariaDB.
The recommended course of action is to copy each site password file to its respective WordPress site root. For example, for a single WordPress site, assuming you've used the script defaults, the password file path will be/root/wordpress_db_password.txt
and assuming your pool is namedtank
, the path to the site root will be/mnt/tank/apps/wordpress
. Copy the password file there e.g.
Code:cp /root/wordpress_db_password.txt /mnt/tank/apps/wordpress
Your password file will then be backup up as part of the backup of your WordPress datasets (you are doing this aren't you?). If you ever have to rebuild the server, just restore your WP sites and copy the backed up password file located in each site root back to/root
.
Refer to the 2.3.3 changelog for details.
To update your existing WordPress jails, run the following commands within the jail:
Code:sed -i '' "s|/var/log/access.log|/var/log/caddy/access.log|" /usr/local/www/Caddyfile sed -i '' "s|validate|configtest|" /usr/local/etc/rc.d/caddy sysrc -x caddy_logdir service caddy restart
Previously bespoke installed, Caddy is now installed using the pkg package manager. Refer to the 2.3.2 changelog for details.
To update your existing WordPress jails, run the following commands within the jail:
Code:pkg install caddy sed -i '' "s|configtest|validate|" /usr/local/etc/rc.d/caddy sysrc caddy_logdir="/var/log" service caddy restart
Improved error checking around the WP_ROOT configuration variable introduced in the last release. Refer to the 2.3.1 changelog for details. There is no change to existing jails.
1. A Caddy web server serves the PHP files in the WordPress jail. Caddy has been upgraded from 2.2.1 to 2.3.0.
To update your WordPress jail, assuming the jail is namedwordpress
, enter the jailiocage console wordpress
and update Caddy:
Code:cd /usr/local/bin fetch https://github.com/caddyserver/caddy/releases/download/v2.3.0/caddy_2.3.0_freebsd_amd64.tar.gz caddy version #2.2.1 service caddy stop mv caddy caddy_2.2.1 tar xvf caddy_2.3.0_freebsd_amd64.tar.gz service caddy start caddy version #2.3.0 rm caddy_2.3.0_freebsd_amd64.tar.gz
2. Configuration variable WP_ROOT replaces FILES_PATH and DB_PATH. This should make script configuration clearer. No change is required for existing WP jails. The change only affects new installations and rebuilds using the latest script.
Notable changes in this release:
Acknowledgements: @NasKar for his valuable contributions to this release.
- Install the command line tool WP-CLI within the jail.
- Bugfix: Avoid the use of $ when generating passwords.
- Bugfix: Authentication keys and salts in wp-config.php.
To update yourwordpress
jail if you've run the previous version 2.1.0 of the script, enter the jailiocage console wordpress
and then follow the instructions below.
Install WP-CLI
Code:curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar chmod +x wp-cli.phar mv wp-cli.phar /usr/local/bin/wp
Amendments to wp-config.php
Edit wp-config.phpcd /usr/local/www/wordpress && ee wp-config.php
.
To support WP_CLI, replace the lines (near the top of the file)...
Code:define('FORCE_SSL_ADMIN', true); if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';
...with...
Code:if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' === $_SERVER['HTTP_X_FORWARDED_PROTO'] ) { $_SERVER['HTTPS']='on'; }
Next, search for AUTH_KEY. If on the next line, AUTH_KEY is also defined, change that to SECURE_AUTH_KEY. Repeat for AUTH_SALT.
References:
After a somewhat bumpy ride upgrading from MariaDB 10.3 to 10.4, the upgrade from MariaDB 10.4 to 10.5 turned out to be painless. There are no outwardly visible changes arising from the upgrade. Assuming you've previously run version 2.0.0 of the installation script, you can upgrade to the newer version of MariaDB by performing the following steps within the WordPress jail:
It's recommended that you backup the MariaDB databases before proceeding. You can use phpMyAdmin to accomplish this. Once you've completed the backup, proceed with the following steps:
Reference: Upgrading from MariaDB 10.4 to MariaDB 10.5
- Stop MariaDB
service mysql-server stop
- Remove MariaDB 10.4
pkg delete mariadb104-server
and its dependenciespkg autoremove
- Install MariaDB 10.5
pkg update
andpkg install mariadb105-server
- Start MariaDB
service mysql-server start
- f you've upgraded from an earlier version of MariaDB (10.3 or earlier), you may still need the root db password for this step. Upgrade the database
mysql_upgrade -p
MariaDB 10.4 uses an improved authentication model. Versions 1.x of the script used MariaDB 10.3. Assuming you've previously run version 1.5.0 of the installation script, you can upgrade to the newer version of MariaDB by performing the following steps within the WordPress jail:
It's recommended that you backup the MariaDB databases before proceeding. You can use phpMyAdmin to accomplish this. Once you've completed the backup, proceed with the following steps:
1. Stop MariaDBservice mysql-server stop
2. Remove MariaDB 10.3pkg delete mariadb103-server
and its dependenciespkg autoremove
3. Install MariaDB 10.4pkg update
andpkg install mariadb104-server
4. Make the following configuration changes within the jail:
Code:chown mysql:mysql /var/run/mysql sed -i '' "s|mysqli.default_socket =|mysqli.default_socket = /var/run/mysql/mysql.sock|" /usr/local/etc/php.ini
5. Start MariaDBservice mysql-server start
6. Restart PHP servicesservice php-fpm restart
7. If you're upgrading from an earlier version of MariaDB (10.3 or earlier), you may need the root db password for this step. Upgrade the databasemysql_upgrade -p
Reference: Upgrading from MariaDB 10.3 to MariaDB 10.4
Create and configure a phpMyAdmin database to store configuration data.
To update your WordPress jailwordpress
if you've run the previous version 1.4.8.1 of the script:
1. First note thewordpress
user password of the WordPress databasecat /root/wordpress_db_passwords.txt
2. Enter the jailiocage console wordpress
and execute the following commands, substituting thewordpress
user password for${DB_PASSWORD}
.
Code:mysql -u root -e "CREATE DATABASE phpmyadmin;" mysql -u root -e "GRANT ALL PRIVILEGES ON phpmyadmin.* TO wordpress@localhost IDENTIFIED BY '${DB_PASSWORD}';"
3. Using a browser, log in to phpMyAdmin and follow the signposts to store phpMyAdmin configuration data in thephpmyadmin
database.
![]()
![]()
Refer to release 1.4.8.1 for details.
This is likely to be one of the last versions to support MariaDB 10.3.