From a7f62fe23b9d27160aeba37c4bd2c22b2e43ebd7 Mon Sep 17 00:00:00 2001 From: Phan Trung Thanh Date: Fri, 17 Nov 2023 12:55:35 +0100 Subject: [PATCH] update wordpress version in rock to 6.4.1 (#156) Co-authored-by: arturo-seijas <102022572+arturo-seijas@users.noreply.github.com> --- src/charm.py | 4 +++- wordpress_rock/rockcraft.yaml | 9 ++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/charm.py b/src/charm.py index 8dfe1024..3a3d2c64 100755 --- a/src/charm.py +++ b/src/charm.py @@ -79,6 +79,7 @@ class _ReplicaRelationNotReady(Exception): "twentytwenty", "twentytwentyone", "twentytwentytwo", + "twentytwentythree", "ubuntu-cloud-website", "ubuntu-community-wordpress-theme/ubuntu-community", "ubuntu-community/ubuntu-community", @@ -382,7 +383,8 @@ def _gen_wp_config(self): define( 'WP_CONTENT_URL', $_w_p_http_protocol . $_SERVER['HTTP_HOST'] . '/wp-content' ); define( 'WP_SITEURL', $_w_p_http_protocol . $_SERVER['HTTP_HOST'] ); define( 'WP_URL', $_w_p_http_protocol . $_SERVER['HTTP_HOST'] ); - define( 'WP_HOME', $_w_p_http_protocol . $_SERVER['HTTP_HOST'] );""" + define( 'WP_HOME', $_w_p_http_protocol . $_SERVER['HTTP_HOST'] ); + define( 'WP_DEFAULT_THEME', "twentytwentythree" );""" ) ] diff --git a/wordpress_rock/rockcraft.yaml b/wordpress_rock/rockcraft.yaml index bac10b83..51d730f2 100644 --- a/wordpress_rock/rockcraft.yaml +++ b/wordpress_rock/rockcraft.yaml @@ -71,7 +71,7 @@ parts: - apache2 plugin: nil build-environment: - - WP_VERSION: 5.9.3 + - WP_VERSION: 6.4.1 build-packages: - curl override-build: | @@ -81,6 +81,8 @@ parts: mkdir -p wordpress_install_dir (cd wordpress_install_dir; $CRAFT_PART_BUILD/wp core download --version=${WP_VERSION} --allow-root) + rm -rf wordpress_install_dir/wp-content/themes/twentytwentythree + rm -rf wordpress_install_dir/wp-content/themes/twentytwentyfour cp -R . $CRAFT_PART_INSTALL organize: wordpress_install_dir: /var/www/html @@ -124,6 +126,7 @@ parts: wp-mastodon-share wp-polls wp-statistics + wordpress-seo override-build: | for plugin in $WP_PLUGINS; do @@ -134,10 +137,6 @@ parts: curl -sSL "https://downloads.wordpress.org/plugin/openid.3.5.0.zip" -o "openid.zip" unzip -q "openid.zip" rm "openid.zip" - # Latest YoastSEO does not support 5.9.3 version of WordPress. - curl -sSL "https://downloads.wordpress.org/plugin/wordpress-seo.18.9.zip" -o "wordpress-seo.zip" - unzip -q "wordpress-seo.zip" - rm "wordpress-seo.zip" cp -R . $CRAFT_PART_INSTALL organize: "*": /var/www/html/wp-content/plugins/