Posts Tagged ‘Wordpress’

Setting up WordPress on Ubuntu

October 20, 2009 3 comments

I just did several projects that required a wordpress install. The setup I used was Ubuntu (ami-5059be39) on EC2, apache and mysql obviously ;). Here is a script I used to prep the system and install necessary libraries

sudo apt-get update

sudo apt-get dist-upgrade

sudo apt-get install git-core
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql server
sudo apt-get install phpmyadmin

Download WordPress and extract to a directory. I used /home/ubuntu/projectname.

Then sym link this directory to /var/www/projectname. When you are done, edit apache conf file, which is located at /etc/apache2/sites-enabled/projectname, to point to the deploy directory:

DocumentRoot /var/www/<strong>projectname

You can use the 000-default file if you want, but I usually rename it to the project name I’m working on to avoid confusion (or if you have more than one subdomain or website running on the same machine).

Last step, restart apache:

sudo /etc/init.d/apache 2 restart

Good luck.

Edit (3/3/2011): updated code formatting.