https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-14-04
If you have not already setup a database, follow the link above for instructions. Otherwise, log in to phpmyadmin and setup a database for the wordpress install.
cd ~
wget http://wordpress.org/latest.tar.gzextract the files:
tar xzvf latest.tar.gzthi will create a directory called wordpress in the home directory.
sudo apt-get install php5-gd libssh2-phpcd ~/wordpresscp wp-config-sample.php wp-config.phpnano wp-config.phpfille in the values for ‘DB_NAME', ‘DB_USER' and ‘DB_PASSORD'
After you close the file, copy the files to the document root:
sudo rsync -avP ~/wordpress/ /var/www/html/… or create another directory after /html/ to copy files to a subdirectory. Example:
sudo mkdir /var/www/html/homethen:
sudo rsync -avP ~/wordpress/ /var/www/html/home/move into the directory:
cd /var/www/html/homechange ownership properties, where user below is the user:
sudo chown -R user:www-data *manually create the uploads folder beneath the wp-content directory:
mkdir /var/www/html/home/wp-content/uploadssudo chown -R :www-data /var/www/html/home/wp-content/uploadsNow you can complete the installation by going to the ip address of the install…
http://server_dmain_name_or_IP
After wordpress is installed, we modify apache to allow URL rewrites:
sudo nano /etc/apache2/sites-available/000-default.confhere we set the ServerName and create a directory section where we allow overrides:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName server_domain_name_or_IP
<Directory /var/www/html/>
AllowOverride All
</Directory>
. . .sudo a2enmod rewritesudo service apache2 restartcreate an .htaccess file:
touch /var/www/html/home/.htaccesssudo chown :www-data /var/www/html/home/.htaccesschmod 664 /var/www/html/home/.htaccessNow in wordpress settings, we can got to ‘Settngs' > ‘Permalinks' and choose settings as necessary