frankenwp
frankenwp copied to clipboard
cant run on google colab
steps
!npm install -g localtunnel
!apt update
!apt install -y curl mariadb-server
!curl https://frankenphp.dev/install.sh | sh
!mv frankenphp /usr/local/bin/
!service mariadb restart &
!mysql -u root --password="password" -e "CREATE USER 'wp_user' IDENTIFIED BY 'password';"
!mysql -u root --password="password" -e "GRANT ALL PRIVILEGES ON wp.* TO 'wp_user';"
!mysql -u root --password="password" -e "FLUSH PRIVILEGES;"
!mysql -u root --password="password" -e "DROP DATABASE IF EXISTS wp;"
!mysql -u root --password="password" -e "CREATE DATABASE IF NOT EXISTS wp;"
!mysql -u root --password="password" -e "FLUSH PRIVILEGES;"
!curl -LOC - https://wordpress.org/latest.zip
!unzip latest.zip
!cd wordpress && frankenphp php-server &
result
2025/02/26 17:34:17.126 WARN admin admin endpoint disabled
2025/02/26 17:34:17.127 WARN http.auto_https server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server {"server_name": "php", "http_port": 80}
2025/02/26 17:34:17.127 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc00055e980"}
2025/02/26 17:34:17.131 WARN http HTTP/2 skipped because it requires TLS {"network": "tcp", "addr": ":80"}
2025/02/26 17:34:17.131 WARN http HTTP/3 skipped because it requires TLS {"network": "tcp", "addr": ":80"}
2025/02/26 17:34:17.131 INFO http.log server running {"name": "php", "protocols": ["h1", "h2", "h3"]}
2025/02/26 17:34:17.168 INFO frankenphp FrankenPHP started 🐘 {"php_version": "8.4.4", "num_threads": 4, "max_threads": 4}
2025/02/26 17:34:17.168 INFO Caddy serving PHP app on :80
2025/02/26 17:34:17.555 INFO tls cleaning storage unit {"storage": "FileStorage:/root/.local/share/caddy"}
2025/02/26 17:34:17.559 INFO tls finished cleaning storage units
expected result
when execute
!cd wordpress && frankenphp php-server &
it should run in background
because of &
then
we could execute another command
to access wordpress
in another tab
import urllib
print("Password/Enpoint IP for localtunnel is:", urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip("\n") )
!npx localtunnel --port 80
thanks and best regards