Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pr-wordpress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- examples/wordpress-mariadb
- examples/wordpress-mariadb-mysql
- examples/wordpress-mysql8
- examples/wordpress-mysql84
- examples/wordpress-nginx
- examples/wordpress-recommended
lando-version:
Expand Down Expand Up @@ -64,3 +65,4 @@ jobs:
cleanup-header: "Destroy tests"
shell: bash
stdin: true
version: 1.0.0-beta.4
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Fixed MySQL 8.2+ startup failure by replacing removed `expire_logs_days` with `binlog_expire_logs_seconds` [#107](https://github.com/lando/wordpress/issues/107)
* Fixed `mysql:8` startup failure by using the MySQL 8 config instead of the 5.7 config

## v1.11.0 - [March 11, 2026](https://github.com/lando/wordpress/releases/tag/v1.11.0)

* Fixed MySQL 8.4 startup failure by removing hardcoded `mysql_native_password` authentication [lando/mysql#69](https://github.com/lando/mysql/issues/69)
Expand Down
2 changes: 1 addition & 1 deletion builders/wordpress.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const getConfigDefaults = options => {
const database = _.first(dbConfig.split(':'));
const version = _.last(dbConfig.split(':')).substring(0, 2);
if (database === 'wordpress-mysql' || database === 'mysql' || database === 'mariadb') {
if (version === '8.') {
if (_.startsWith(version, '8')) {
options.defaultFiles.database = 'mysql8.cnf';
} else {
options.defaultFiles.database = 'mysql.cnf';
Expand Down
2 changes: 1 addition & 1 deletion config/mysql8.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ read_buffer_size = 2M
# other settings you may need to change.
#server-id = 1
#log_bin = /src/.lando/log/mysql-bin.log
expire_logs_days = 10
binlog_expire_logs_seconds = 864000
max_binlog_size = 101M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
Expand Down
1 change: 1 addition & 0 deletions examples/wordpress-mysql84/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mysql84
87 changes: 87 additions & 0 deletions examples/wordpress-mysql84/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
WordPress MySQL 8.4 Example
===========================

This example exists primarily to test the following documentation:

* [WordPress Recipe](https://docs.devwithlando.io/tutorials/wordpress.html)

## Start up tests

Run the following commands to get up and running with this example.

```bash
# Should poweroff
lando poweroff

# Should initialize the latest WordPress codebase
rm -rf mysql84 && mkdir -p mysql84 && cd mysql84
lando init --source remote --remote-url https://wordpress.org/latest.tar.gz --recipe wordpress --webroot wordpress --name lando-wordpress-mysql84 --option database=mysql:8
cp -f ../../.lando.upstream.yml .lando.upstream.yml && cat .lando.upstream.yml

# Should start up successfully
cd mysql84
lando start
```

## Verification commands

Run the following commands to validate things are rolling as they should.

```bash
# Should return the WordPress installation page by default
cd mysql84
lando exec appserver -- curl -L localhost | grep "WordPress"

# Should use 8.3 as the default php version
cd mysql84
lando php -v | grep "PHP 8.3"

# Should be running apache 2.4 by default
cd mysql84
lando exec appserver -- apachectl -V | grep 2.4
lando exec appserver -- curl -IL localhost | grep Server | grep 2.4

# Should be running mysql 8.4.x via the mysql:8 alias
cd mysql84
lando mysql -V | grep '8.4.'

# Should not enable xdebug by default
cd mysql84
lando php -m | grep xdebug || echo $? | grep 1

# Should use the default database connection info
cd mysql84
lando mysql -uwordpress -pwordpress wordpress -e quit

# Should use the default mysql8 config file
cd mysql84
lando exec database -- cat /opt/bitnami/mysql/conf/my_custom.cnf | grep "LANDOWORDPRESSMYSQL8CNF"
lando mysql -u root -e "show variables;" | grep innodb_lock_wait_timeout | grep 127

# Should use binlog_expire_logs_seconds instead of the removed expire_logs_days
cd mysql84
lando mysql -u root -e "show variables;" | grep binlog_expire_logs_seconds | grep 864000

# Should have the 2.x wp-cli
cd mysql84
lando wp cli version | grep "WP-CLI 2."

# Should create a wp-config file
cd mysql84/wordpress
lando wp config create --dbname=wordpress --dbuser=wordpress --dbpass=wordpress --dbhost=database --force

# Should be able to install wordpress
cd mysql84/wordpress
lando wp core install --url=lando-wordpress.lndo.site --title=LandoPress --admin_user=admin --admin_email=mike@pirog.com --skip-email
```

## Destroy tests

Run the following commands to trash this app like nothing ever happened.

```bash
# Should be destroyed with success
cd mysql84
lando destroy -y
lando poweroff
```
Loading