Skip to content

Instantly share code, notes, and snippets.

@dwelch2344
Created February 3, 2015 17:35
Show Gist options
  • Save dwelch2344/7b041d27787a7f473e7f to your computer and use it in GitHub Desktop.
Save dwelch2344/7b041d27787a7f473e7f to your computer and use it in GitHub Desktop.
A simple wordpress setup
# As root
apt-get update
apt-get install -y nginx mysql-server php5-fpm php5-mysql php5-gd libssh2-php unzip
mysql_install_db
mysql_secure_installation
echo 'cgi.fix_pathinfo=0' >> /etc/php5/fpm/php.ini
mysql -u root -p -e "DROP DATABASE IF EXISTS wordpress; CREATE DATABASE wordpress; CREATE USER wpuser@localhost IDENTIFIED BY 'WP_PASSWORD_HERE'; GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost; FLUSH PRIVILEGES;"
wget wordpress.org/latest.zip
unzip latest.zip
rm latest.zip
mv wordpress /var/www/wordpress
mkdir -p /var/www/wordpress/wp-content/uploads
chown -R :www-data /var/www/wordpress
https://gist.githubusercontent.com/dwelch2344/8d2d187cd54ee5da21d3/raw/a4f915dc9fb02b906eaaf094453c1ff0e917188f/vhost > /etc/nginx/sites-available/default
service nginx restart
service php5-fpm restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment