]> git.openstreetmap.org Git - chef.git/commitdiff
wordpress: bring site url under chef control
authorGrant Slater <github@firefishy.com>
Mon, 7 Aug 2023 14:05:39 +0000 (15:05 +0100)
committerGrant <github@firefishy.com>
Mon, 7 Aug 2023 15:17:59 +0000 (16:17 +0100)
cookbooks/wordpress/resources/site.rb

index b29f95f3f0f63bd069dc96dee765be7f32c389de..52bba4ce5ae9a724f4bdab868e6b140bee303467 100644 (file)
@@ -101,6 +101,8 @@ action :create do
       line += "/**\r\n"
       line += " * Don't allow file editing.\r\n"
       line += " */\r\n"
+      line += "define( 'WP_HOME', 'https://#{new_resource.site}');\r\n"
+      line += "define( 'WP_SITEURL', 'https://#{new_resource.site}');\r\n"
       line += "define( 'DISALLOW_FILE_EDIT', true);\r\n"
       line += "define( 'DISALLOW_FILE_MODS', true);\r\n"
       line += "define( 'AUTOMATIC_UPDATER_DISABLED', true);\r\n"