apt-get update apt-get install apache2 libapache2-mod-php5 php5-gd php5-mysqlnd mysql-server
Enter MySQL root password twice
Run the MySQL secure installation script:
mysql_secure_installation
NOTE: Apache is configured to run as www-data in /etc/apache2/envvars:
export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data
mysql -p create database wordpress character set utf8; create user 'wordpress'@'localhost' identified by 'secret'; grant all privileges on wordpress.* to 'wordpress'@'localhost'; quit;
cd /var/www wget http://wordpress.org/latest.tar.gz tar xf latest.tar.gz chown -R www-data:www-data wordpress cd wordpress
If you want Wordpress to be your default site for the configured interface simply modify /etc/apache2/sites-enabled/000-default:
cp -p /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig vi /etc/apache2/sites-enabled/000-default
If you already have a default site simply create a new vhost config file under /etc/apache2/sites-available/wordpress and run:
cp -p /etc/apache2/sites-available/default /etc/apache2/sites-available/wordpress a2ensite wordpress vi /etc/apache2/sites-enabled/wordpress
Enable Apache rewrite rules:
a2enmod rewrite /etc/init.d/apache2 restart