candland

@candland rss self
September 17th 2010

WordPress Quick Install and Setup On Ubuntu

apache, linux, mysql, php, wordpress


wordpressHere’s some quick notes for installing WordPress on Ubuntu 10.

Official install doc: http://codex.wordpress.org/Installing_WordPress.

I choose hosting on Linode, which has been an awesome experience so far, they have really good help guides too.

Server

You’ll need MySql, PHP, Apache installed.

apt-get install apache2 apache2-doc apache2-utils 
apt-get install libapache2-mod-php5 php5 php-pear php5-xcache php5-suhosin php5-mysql
apt-get install mysql-server

Run MySql Secure Installation

mysql_secure_installation

Enable Rewriting

a2enmod rewrite

Enable image support for php.

sudo apt-get install php5-gd
/etc/init.d/apache2 restart

Get It

wget http://wordpress.org/latest.tar.gz 
 
tar -xzvf latest.tar.gz

Database

mysql -u adminusername -p

CREATE DATABASE databasename;
 
GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"localhost"
IDENTIFIED BY "password";
  
FLUSH PRIVILEGES;

Setup Apache

Create the web root directories

mkdir /var/www/red27.net/public_html -p 
  
mkdir /var/www/red27.net/logs

Create an apache virtual host config

See what’s there in the sites-available

ls /etc/apache2/sites-available/

Copy an existing config

cp /etc/apache2/sites-available/candland.net /etc/apache2/sites-available/red27.net

Edit to match the correct location.

vim /etc/apache2/sites-available/red27.net

Copy the WP files to the site root

cp downloads/wordpress/* /var/www/red27.net/public_html/ -r

Change owner

chown -R www-data /var/www/red27.net/public_html/

Config WordPress

Rename the wp-config.php file

mv /var/www/red27.net/public_html/wp-config-sample.php /var/www/red27.net/public_html/wp-config.php

Edit the wp-config.php, set the correct db connection values, and replace the security lines from here

vim /var/www/red27.net/public_html/wp-config.php

Enable the site

a2ensite red27.net

Restart apache

/etc/init.d/apache2 restart

Visit the site and configure WordPress!

blog comments powered by Disqus