Skip to content

Commit 38dcb9c

Browse files
committed
update wp setup file
1 parent 6109984 commit 38dcb9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

wordpress/setup.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ if ! wp plugin is-active next-revalidate --allow-root 2>/dev/null; then
3535
fi
3636

3737
# Activate the headless theme (always run, safe if already active)
38+
# Note: Theme directory name must match the actual directory in wp-content/themes
3839
echo "Activating Next.js Headless theme..."
39-
wp theme activate nextjs-headless --allow-root || true
40+
wp theme activate theme --allow-root || wp theme activate nextjs-headless --allow-root || true
4041

4142
# Configure the plugin if NEXTJS_URL is set
4243
if [ -n "$NEXTJS_URL" ]; then
4344
echo "Configuring Next.js Revalidation plugin..."
44-
wp option update next_revalidate_settings "{\"nextjs_url\":\"${NEXTJS_URL}\",\"webhook_secret\":\"${WORDPRESS_WEBHOOK_SECRET:-}\",\"enable_notifications\":false,\"cooldown\":2}" --format=json --allow-root
45+
# Plugin expects: nextjs_url, webhook_secret, cooldown (no enable_notifications field)
46+
wp option update next_revalidate_settings "{\"nextjs_url\":\"${NEXTJS_URL}\",\"webhook_secret\":\"${WORDPRESS_WEBHOOK_SECRET:-}\",\"cooldown\":2}" --format=json --allow-root
4547
echo "Plugin configured with Next.js URL: $NEXTJS_URL"
4648
fi
4749

0 commit comments

Comments
 (0)