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.
It's no longer necessary to configure phpMyAdmin manually. An improved password algorithm has been adopted for the script. The number of manual post-installation tasks is now at a minimum.
There are no changes to the jail between versions 1.4.7 and 1.4.8 of this resource. This revision streamlines the installation phase by having the script do more while further reducing the need for manual post-installation intervention.
Manually generating Authentication Unique Keys and Salts is no longer necessary. The steps to do this have been merged into the installation script. Instructions for manual post-installation tasks have been revised to reflect this change.
There are no changes to the jail between versions 1.4.6 and 1.4.7 of this resource. This revision streamlines the installation phase by having the script do more while further reducing the need for manual post-installation intervention.
Manually securing MariaDB is no longer necessary. The steps to do this have been merged into the installation script. Instructions for manual post-installation tasks have been revised to reflect this change.
There are no changes to the jail between versions 1.4.5 and 1.4.6 of this resource. This revision streamlines the installation phase by having the script do more while further reducing the need for manual post-installation intervention.