WordPress Installation Tutorial

Installation of WordPress

WordPress stores it’s contents in a MySQL database. Thus, it is necessary that you install MySQL first and create a database. For installation of MySQL, do an

$ sudo apt-get install mysql-server mysql-client php5-mysql

During installation you’ll be prompted to enter a password for the MySQL root account. Make sure to use a strong password! To set up the database, start the mysql-config:

$ mysql -u root -p

After you entered the root mysql password, you’re ending up at the mysql prompt

$ mysql>

Now, create your database

CREATE DATABASE wordpress;
CREATE USER wordpressuser;
SET PASSWORD FOR wordpressuser=PASSWORD("12345678")
GRANT ALL PRIVILEGS ON wordress.* TO wordpressuser IDENTIFIED BY '12345678';
FLUSH TABLES;

Then quit mysql.

exit

For installation of WordPress, you can either do an apt-get install WordPress. The advantage is, that all dependencies to run WordPress will be solved automatically. However, I’d rather prefer the latest version, thus I installed WordPress with:

<code>$ cd /var/tmp
$ sudo wget http://wordpress.org/latest.tar.gz
$ sudo tar zxf latest.tar.gz
$ sudo mkdir /var/www/wordpress
$ sudo mv wordpress/* /var/www/wordpress
$ sudo rmdir wordpress
$ cd /var/www/wordpress
$ sudo cp wp-config-sample.php wp-config.php
</code>

Now, edit  the wp-config.php

/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'wordpressuser');
/** MySQL database password */
define('DB_PASSWORD', '12345678');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

Then navigate with your browser to your local wordpress installation. You can find the ip address of your Raspi with ifconfig.

http://<ip_address>/wordpress

Now follow the instructions on your brand-new WordPress page.