Install WordPress in the hard way

Install LAMP (mysql, apache, php)

refresh the linux repository
apt-get update

Install apache2
apt-get install apache2
test apache2 by going to localhost:80

install php with apache2 support
apt-get install php5 libapache2-mod-php5
test php by writing info.php in /var/www/ folder.
restarting apache2 is needed.

install mysql
apt-get install mysql-server mysql-client libapache2-mod-auth-mysql php5-mysql
restarting apache2 is needed to find mysql module installed.

Install WordPress

using virtual host
locate the default file in /etc/apache2/sites-available.
copy it to a the site name “wordpress”
Change the document root to the wordpress unzipped directory.
change accordingly.
disable default and enable the created.
a2dissite default && a2ensite mysite

Configure WordPress

preparing mysql
CREATE USER wordpressuser@localhost;
SET PASSWORD FOR wordpressuser@localhost = PASSWORD("your own password");
GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'your own password';

Update mysql into wp-config
create wp-config.php by copying wp-config-sample.php
update database name, mysql user and host accordingly.

follow by localhost/wp-admin/install.php

Enhancing WordPress

Enable Permanent Link (Permalinks)

Apache web server with the mod_rewrite module to be installed
a2enmod rewrite

update apache virtual host configuration file
change AllowOverride None to ALL
enable FollowSymLinks option

An .htaccess file (if this file is missing, WordPress will try to create it when you activate “pretty” permalinks)
If you want WordPress to update the .htaccess file automatically, WordPress will need write access to the file.

However, the folder is not accessible for writing.
In this case, update the folder access right to allow apache2 to write on it.
chown -R www-data:www-data wordpress
usermod -a -G www-data your-ssh-name

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: