WordPress on Ubuntu 14.04

NOTE: You must have the LAMP stack installed before installing WordPress.

Create the WordPress database, user, and password

mysql -u root -p

Now, create the database and user for your WordPress installation. You can replace WPdatabase, WPuser, and WPpassword with your own database name, username, and password in the following commands:

CREATE DATABASE wordpressdb;


CREATE USER WPuser@localhost IDENTIFIED BY 'WPpassword';


GRANT ALL PRIVILEGES ON WPdatabase.* TO WPuser@localhost;

Now, flush the privileges and restart the service:





service apache2 restart


service mysql restart


Install WordPress

Make a temporary directory to download WordPress into:

mkdir temp

Now change directories and download the WordPress zip file:
cd temp

wget http://wordpress.org/latest.zip

Install Unzip:
apt-get install unzip

A few libraries need to be installed so that you can use WordPress properly:
apt-get update

apt-get install php5-gd libssh2-php

Unzip the WordPress file:
unzip -q latest.zip -d /var/www/html/

Grant permissions to the directory:
chown -R www-data.www-data /var/www/html/wordpress

chmod -R 755 /var/www/html/wordpress

Now, make the uploads directory:
mkdir -p /var/www/html/wordpress/wp-content/uploads

Grant the web server permission to write to the directory:
chown -R :www-data /var/www/html/wordpress/wp-content/uploads

Now copy the default configuration file to the correct filename:
cd /var/www/html/wordpress/

cp wp-config-sample.php wp-config.php

Open the wp-config.php file:
vi wp-config.php

Look through the wp-config.php file and replace 'wordpressdb' with your wordpress database name, 'wordpressuser' with your username, and 'wordpresspassword' with your password. User the database name, username, and password that you used when creating the database.

Now complete the WordPress setup now located at http://yourdomain.com/wp-admin/install.php, where 'yourdomain.com' is replaced with your actual domain.

  • 16 Users Found This Useful
Was this answer helpful?

Related Articles

IP rDNS/PTR records

You can configure PTR or Reverse DNS records via the VPS Control Panel under rDNS. The record...

Serial Console

You may wish to use the Serial Console if the SSH console becomes inaccessible. The Serial...

LAMP on CentOS 6

Install Apache Web sudo yum install httpd Edit Apache's httpd.confThe httpd.conf...

LAMP on Debian 7

Install Apache Web sudo apt-get install apache2 Edit Apache's httpd.confThe...

LAMP on Ubuntu 14.04

Install Apache sudo apt-get update sudo apt-get install apache2 Install MySQL...