Repository navigation
Expand file tree
/
Copy pathsetup_ssl.sh
More file actions
executable file
·58 lines (50 loc) · 1.79 KB
/
Copy pathsetup_ssl.sh
File metadata and controls
executable file
·58 lines (50 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# WordPress Local Development Environment - SSL Setup Script
# This script helps set up trusted SSL certificates using mkcert
echo "🔐 WordPress Local Development Environment - SSL Setup"
echo "======================================================"
echo ""
# Check if mkcert is installed
if ! command -v mkcert &> /dev/null; then
echo "❌ mkcert is not installed"
echo ""
echo "📦 Please install mkcert first:"
echo " macOS: brew install mkcert"
echo " Linux: https://github.com/FiloSottile/mkcert#installation"
echo " Windows: https://github.com/FiloSottile/mkcert#installation"
echo ""
exit 1
fi
echo "✅ mkcert is installed: $(mkcert -version)"
echo ""
# Check if local CA is already installed
if mkcert -CAROOT &> /dev/null; then
echo "✅ Local CA is already installed"
echo "ℹ️ SSL certificates will be automatically trusted by browsers"
echo ""
echo "🚀 You can now create WordPress projects with trusted SSL!"
echo " Run: python app.py"
exit 0
fi
echo "🔧 Installing local CA (requires sudo access)..."
echo ""
# Install the local CA
echo "Running: mkcert -install"
echo "This will add a local CA to your system trust store."
echo ""
if mkcert -install; then
echo ""
echo "✅ Local CA installed successfully!"
echo "ℹ️ SSL certificates will now be automatically trusted by browsers"
echo ""
echo "🚀 You can now create WordPress projects with trusted SSL!"
echo " Run: python app.py"
else
echo ""
echo "❌ Failed to install local CA"
echo "ℹ️ You can still use SSL, but browsers will show security warnings"
echo " To install manually, run: mkcert -install"
echo ""
echo "🚀 You can still create WordPress projects with SSL!"
echo " Run: python app.py"
fi