Quick LAMPW (WordPress) server setup on Debian


sudo apt-get update
sudo apt-get install apache2 mysql-server php5 libapache2-mod-php5 php5-mysql phpmyadmin vim git sendmail curl php5-curl
sudo a2enmod rewrite
cd /var/www/
sudo wget https://wordpress.org/latest.tar.gz
sudo tar -zxvf latest.tar.gz
sudo chown -R www-data:www-data wordpress/

VirtualHost Setup

<VirtualHost *:80>
 # The ServerName directive sets the request scheme, hostname and port that
 # the server uses to identify itself. This is used when creating
 # redirection URLs. In the context of virtual hosts, the ServerName
 # specifies what hostname must appear in the request's Host: header to
 # match this virtual host. For the default virtual host (this file) this
 # value is not decisive as it is used as a last resort host regardless.
 # However, you must set it for any further virtual host explicitly.

 ServerName www.founderstories.ch

 ServerAdmin webmaster@localhost
 DocumentRoot /var/www/wordpress

<Directory /var/www/wordpress >
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all

 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined


Restart Apache

sudo /etc/init.d/apache2 restart

Set up the database:

mysql -uroot -pyourpassword -e "create database wordpress"
mysql -uroot -pyourpassword -e "GRANT ALL PRIVILEGES ON wordpress.* To 'wordpress'@'localhost' IDENTIFIED BY 'password';"

Then finish the setup by going through the WordPress installation web wizard.