Created
March 3, 2014 03:20
-
-
Save bburky/9317876 to your computer and use it in GitHub Desktop.
Instantly download and run WordPress using SQLite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# One line: | |
# curl -L http://git.io/wp.sh | sh | |
# Optionally specify port number: | |
# curl -L http://git.io/wp.sh | PORT=8888 sh | |
# The directory "wordpress" will be created in the current directory. | |
test -e wordpress && echo "wordpress/ already exists" && exit | |
# Download latest WordPress and extract to wordpress/ | |
curl https://wordpress.org/latest.tar.gz | tar -zx | |
# Install SQLite Integration to avoid a MySQL server | |
# https://wordpress.org/plugins/sqlite-integration/ | |
cd wordpress/wp-content/plugins/ | |
curl -O https://downloads.wordpress.org/plugin/sqlite-integration.1.5.zip | |
unzip sqlite-integration.1.5.zip | |
rm sqlite-integration.1.5.zip | |
mv sqlite-integration/db.php ../ | |
# Open http://localhost:8080/ | |
echo | |
echo "Configure wp-config.php with default DB settings, they're ignored" | |
echo | |
( ( sleep 2 && | |
( type xdg-open && xdg-open "http://localhost:${PORT-8080}/" ) || | |
( type open && open "http://localhost:${PORT-8080}/" ) ) & ) >/dev/null 2>&1 | |
# Start the built-in PHP web server | |
# Requires PHP 5.4.0 or newer | |
cd ../../ | |
php -S "localhost:${PORT-8080}" | |
# That's all! |
WOW, i like!!! i was thinking on make something like that as localhost web notepad :D so wordpress is the best for that. Thank you so much i will test both options.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alternatively use wp-cli and wp-cli/server-command: