Install WordPress on Ubuntu 14.10 with LAMP

ADVERTISEMENT

WordPress Logo

WordPress is the most widely used open source web blogging and content management software written in php and MySQL, even ITzGeek uses WordPress. Here is the small tutorial on setting up WordPress installation on Ubuntu 14.10, this is very simple as like having a bear; wont take more than 5 min.

ADVERTISEMENT
Article will continue after the ad

Prerequisites:

WordPress requires Apache, PHP and MySQL. You can look at how to install LAMP on Ubuntu 14.10.

Create Database:

Login into MariaDB.

mysql -u root -p

Create the desired database for WordPress.

CREATE DATABASE wordpress;

Create a user with password.

CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'wppassword';

Grant the permission to the created user to access database.

GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;

Configure WordPress:

Download the latest WordPress.

wget http://wordpress.org/latest.tar.gz

Extract it.

sudo tar -zxvf latest.tar.gz

Move the extracted files to /var/www/html/ directory.

sudo mv wordpress/* /var/www/html

Copy the wp-sample-config.php file and make it as wp-config.php file.

sudo cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php

Edit the config file and mention the database information.

sudo nano /var/www/html/wp-config.php

Default will look like below.

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘database_name_here‘);
/** MySQL database username */
define(‘DB_USER’, ‘username_here‘);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘password_here‘);
/** MySQL hostname */
define(‘DB_HOST’, ‘localhost‘);

Modified entries according to the created database user and database will look like.

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘wordpress‘);
/** MySQL database username */
define(‘DB_USER’, ‘wpuser‘);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘wppassword‘);
/** MySQL hostname */
define(‘DB_HOST’, ‘localhost‘);

Make the apache user as the owner to WordPress directory.

sudo chown -R www-data:www-data /var/www/html/

Remove the default index.html from /var/www/html directory.

sudo rm -rf /var/www/html/index.html

Install WordPress:

Open your browser and visit http://your-ip-address/.

Ubuntu 14.10 - Ubuntu Installation - Language Selection
Ubuntu 14.10 – Ubuntu Installation – Language Selection

Enter the site information and click on Install WordPress. In next page, click on continue. You will be asked to enter the password to access the WordPress admin section.

That’s All!.

 

ADVERTISEMENT

POSTS YOU MAY LIKE -:)

Share This Post

Shares