Installing WordPress on Ubuntu

http://www.ubuntugeek.com/installing-wordpress-3-0-on-ubuntu-10-04-lucid-lynx.html

Installation
apt-get install apache2 libapache2-mod-php5 mysql-server php5-mysql php5-curl php5-gd libssh2-php

cd /var/www/
wget http://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
ls -la
chown -R www-data:www-data wordpress
rm -f latest.zip

Apache
/etc/apache2/sites-available/wordpress.conf

<VirtualHost *:80>
        ServerAdmin my@email.com
        ServerName www.example.org
        ServerAlias example.org
        DocumentRoot /var/www/wordpress

        Redirect permanent / https://www.example.org/

        ErrorLog /var/log/apache2/example.org-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/example.org-access.log combined
</VirtualHost>

/etc/apache2/sites-available/wordpress-ssl.conf

<VirtualHost *:443>
        ServerAdmin my@email.com
        ServerName www.example.org
        ServerAlias example.org
        DocumentRoot /var/www/wordpress/

        <Directory /var/www/wordpress>
                Options -Indexes +FollowSymLinks +MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
                DirectoryIndex index.php
        </Directory>

        Alias /wordpress /var/www/wordpress

        ErrorLog /var/log/apache2/example.org-ssl-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/example.org-ssl-access.log combined

        SSLEngine on
        SSLProtocol all -SSLv2
        SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
        SSLCertificateFile /etc/ssl/example.org.cer
        SSLCertificateKeyFile /etc/ssl/private/example.org.key
        SSLCertificateChainFile /etc/ssl/startssl.sub2.ca.pem
        SSLCACertificateFile /etc/ssl/startssl.root.cs.pem
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

        CustomLog /var/log/apache2/example.org-ssl-request.log \
         "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

/var/www/wordpress/.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Activate both new sites and modules:

a2ensite wordpress wordpress-ssl
a2enmod ssl rewrite headers

MySQL

mysql -u root -p
SHOW DATABASES;
SELECT User FROM mysql.user;
DROP DATABASE drupal6;
DELETE FROM mysql.user WHERE User=`drupal6`;
CREATE DATABASE `wp_db`;
CREATE USER `wp_user`;
SET PASSWORD FOR 'wp_user' = PASSWORD('mysecretpassword');
GRANT ALL PRIVILEGES ON `wp_db`.* TO 'wp_user'@'localhost' IDENTIFIED BY 'mysecretpassword';
FLUSH PRIVILEGES;
EXIT
rm -f ~/.mysql_history

service mysql restart

Configuration

cd /var/www/wordpress
cp wp-config-sample.php wp-config.php
chown www-data:www-data wp-config.php

/var/www/wordpress/wp-config.php

    DB_NAME: Database Name used by WordPress
    DB_USER: Username used to access Database
    DB_PASSWORD: Password used by Username to access Database
    DB_HOST: The hostname of your Database Server

https://api.wordpress.org/secret-key/1.1/salt/

    AUTH_KEY
    SECURE_AUTH_KEY
    LOGGED_IN_KEY
    NONCE_KEY

service apache2 restart

http://your.domain/wp-admin/install.php