This brief tutorial will show you how to install and configure the latest version of WordPress on Ubuntu 14.10 server. WordPress is a great content management system and as such, a great blogging platform.

If you want to host a blog or website, you should first do it using WordPress before any other CMS. Seasoned webmasters will probably say the same. The reason is WordPress is simple to use right out of the box. New users will find WordPress easy to learn and manage than most CMS online today.

WordPress relies on the LAMP stack which includes Linux, Apache2, MySQL and PHP. You can get to work on Windows, but that configuration not recommended for production environments. Instead of only Apache2, WordPress also runs on Nginx, Lighttpd and other opensource webservers.

For this tutorial, we’ll be installing the LAMP stack, Linux, Apache2, MySQL and PHP.

To get started with WordPress, go and install the LAMP stack. Our recent post shows you how to do it easily. To view that post, please click the link below.

https://www.liberiangeek.net/2014/10/install-apache2-php-mysql-support-lamp-ubuntu-14-10/

Assuming that you’ve read our previous post on installing the LAMP stack on Ubuntu, continue below to get WordPress working. If you haven’t read our previous post, please scroll back up and click the link to go and learn how to install LAMP.

 

  • Configuring Apache2

Now that Apache2 is installed, assuming you read our previous post, continue below to configure it. By default, Ubuntu installs Apache2 puts its configuration folder in the /etc directory.

Also, the default root directory for Apache2 on Ubuntu is at /var/www/html/  Put WordPress content into that directory and WordPress should just working without much configurations.

 

  • Downloading WordPress

Next, go and download the latest version of WordPress and move it to Apache2 default root directory (/var/www/html).

To get WordPress run the commands below.

cd /tmp/ && wget http://wordpress.org/latest.tar.gz

Next, run the commands below to extract the downloaded content to Apache2 root directory.

tar -xvzf latest.tar.gz

Move the WordPress content to the root directory.

sudo mv wordpress/* /var/www/html/

 

  • Configuring WordPress Database

The next step is to configure WordPress database. WordPress uses databases to store it content. To setup a database for WordPress, login to the database server by running the commands below.

mysql -u root -p

 

Next, run the commands below to create a database called wpdb.

CREATE DATABASE wpdb;

Next create a database user called wpuser and create a new password.

CREATE USER [email protected] IDENTIFIED BY 'new_password_here';

Then grant all privileges to the new users for wpdb

GRANT ALL ON wpdb.* to [email protected];

Finally, refresh the databse

FLUSH PRIVILEGES;

Exit.

The final step is to configure WordPress setting with new database info. To do that, rename WordPress settings file from wp-config-sample.php to wp-config.php

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

Then open the file and make below changes with the database info;

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

 

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wpdb');

/** MySQL database username */
define('DB_USER', 'wpuser');

/** MySQL database password */
define('DB_PASSWORD', 'password');

Save the file and you’re done.

Grant Apache2 permissions to manage the directory

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

Set the correct permissions for folders and files.

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

Restart Apache2

sudo service apache2 restart

Open your browser and connect to http://IP_address/index.php

 

wordpress ubuntu 14.10

 

Enjoy!