Created
May 18, 2013 09:16
-
-
Save ariofrio/5603825 to your computer and use it in GitHub Desktop.
Script that installs Wordpress on NearlyFreeSpeech.net. Takes care of safe_mode permissions, temporary folder, and automatic installation of plugins, etc.
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 | |
set -ex | |
cd /home/public | |
# Download Wordpress | |
wget http://wordpress.org/latest.tar.gz | |
tar -xf latest.tar.gz | |
rm latest.tar.gz | |
mv wordpress/* . | |
rmdir wordpress | |
# Set up safe_mode permissions | |
chgrp -R web . | |
chmod -R g+w . | |
echo "Visit http://$(hostname)/ to setup the database and site info." | |
echo "You'll need a MySQL database (https://members.nearlyfreespeech.net/mysql)." | |
echo | |
REPLY= | |
while [ "$REPLY" != "done" ]; do | |
echo -n "Once you are ready, type done: " | |
read | |
done | |
# Set up temporary folder and enable Automatic Installs | |
mkdir ../tmp/wordpress; chgrp web ../tmp/wordpress; chmod g+w ../tmp/wordpress | |
echo "define('WP_TEMP_DIR', ABSPATH.'../tmp/wordpress');" >> wp-config.php | |
echo "define('FS_METHOD', 'direct');" >> wp-config.php | |
echo | |
echo "All files have been left writable by the web process. Please consider reading" | |
echo "http://codex.wordpress.org/Hardening_WordPress." | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instructions: Create a site, ssh into it and run: