|
1 | 1 | #!/bin/bash |
2 | 2 | set -eox pipefail |
3 | 3 |
|
| 4 | +echo "=== SETUP.SH DEBUG ===" |
| 5 | +echo "Current working directory:" |
| 6 | +pwd |
| 7 | +echo "" |
| 8 | + |
| 9 | +echo "WordPress themes directory contents:" |
| 10 | +ls -la /var/www/html/wp-content/themes/ || echo "Could not list themes directory" |
| 11 | +echo "" |
| 12 | + |
| 13 | +echo "Checking for hello-elementor theme specifically:" |
| 14 | +if [ -d "/var/www/html/wp-content/themes/hello-elementor" ]; then |
| 15 | + echo "✅ hello-elementor directory found" |
| 16 | + echo "Contents:" |
| 17 | + ls -la /var/www/html/wp-content/themes/hello-elementor/ | head -10 |
| 18 | + echo "" |
| 19 | + |
| 20 | + echo "Checking for style.css:" |
| 21 | + if [ -f "/var/www/html/wp-content/themes/hello-elementor/style.css" ]; then |
| 22 | + echo "✅ style.css found" |
| 23 | + echo "Theme header:" |
| 24 | + head -10 /var/www/html/wp-content/themes/hello-elementor/style.css |
| 25 | + else |
| 26 | + echo "❌ style.css missing" |
| 27 | + fi |
| 28 | +else |
| 29 | + echo "❌ hello-elementor directory not found" |
| 30 | + echo "Available theme directories:" |
| 31 | + ls -la /var/www/html/wp-content/themes/ |
| 32 | +fi |
| 33 | +echo "" |
| 34 | + |
4 | 35 | wp plugin activate elementor |
5 | | -echo "Available themes:" |
| 36 | +echo "Available themes (via WP-CLI):" |
6 | 37 | wp theme list |
7 | | -echo "Attempting to activate hello-elementor theme..." |
8 | | -wp theme activate hello-elementor |
| 38 | +echo "" |
| 39 | + |
| 40 | +echo "Attempting to activate hello-theme theme..." |
| 41 | +wp theme activate hello-theme || { |
| 42 | + echo "❌ Failed to activate hello-theme, trying hello-elementor..." |
| 43 | + wp theme activate hello-elementor || { |
| 44 | + echo "❌ Both activation attempts failed. Final theme list:" |
| 45 | + wp theme list |
| 46 | + echo "❌ Available theme directories in WordPress:" |
| 47 | + ls -la /var/www/html/wp-content/themes/ |
| 48 | + echo "❌ Theme activation completely failed" |
| 49 | + exit 1 |
| 50 | + } |
| 51 | +} |
9 | 52 |
|
10 | 53 | WP_CLI_CONFIG_PATH=hello-elementor-config/wp-cli.yml wp rewrite structure '/%postname%/' --hard |
11 | 54 |
|
|
0 commit comments