Verified and Tested 10/20/15

Introduction

This how-to will take you through installing WordPress on Debian 8.2 “jessie”. WordPress is an open source blogging and CMS platform. WordPress has thousands of plugins that you can use to make your site customized to your needs.

WordPress Illustration by Walker Cahall WordPress Illustration by Walker Cahall

Prerequisites

To install WordPress, a Debian 8.2 server running LAMP or LEMP is required. Please see our how-to guides for installing LAMP or LEMP.

Installing WordPress on Debian 8.2

Installing WordPress is very simple if you follow these steps. We will first start off by setting up the MySQL database.

Setting up the MySQL database in Debian 8.2

We are going to start off by setting up the MySQL database by running the following commands:

mysql -u root -p

When prompted, enter your MySQL root password that you set up when installing MySQL.

In MySQL enter the following commands:

create database wordpress character set utf8 collate utf8_bin;

Make sure you set your secure password where it says [insert-password-here]

grant all privileges on wordpress.* to wordpressuser@localhost identified by '[insert-password-here]';
flush privileges;
exit

Get the Latest WordPress Install on Debian 8.2

Now that the database is created, we can download the latest version of WordPress with the following command:

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

The latest package will download to the directory that you are currently in, with the file name latest.tar.gz. We need to decompress the file by running:

tar -xzvf latest.tar.gz

Configure WordPress on Debian 8.2

Next, we need to copy wp-config-sample.php to wp-config.php which is where WordPress gets its base configuration. To do that, run:

cp wordpress/wp-config-sample.php wordpress/wp-config.php

In your favorite text editor, edit wordpress/wp-config.php

For a basic setup, we need to have the following.

define(‘DB_NAME’, ‘wordpress’);

define(‘DB_USER’, ‘wordpressuser’);

define(‘DB_PASSWORD’, ‘[insert-password-here]’);

It should look like this when completed:

anet-Installing WordPress on a Debian 8.2 Cloud Server or VPS-01

Installing WordPress on a Debian 8.2 Cloud Server

 

Next, we need to move the WordPress folder to your web directory.

cp -r ~/wordpress/* /var/www/html

Note: Your web directory may be different based on your configuration.

Finish The Installation Through The WordPress Web Installation

Now, we can go to the WordPress web installation. In your browser go to http://yourhostname-or-ipaddress

If you are unsure what your IP address is, run the following:

ifconfig

anet-Installing WordPress on a Debian 8 Cloud Server or VPS-02

An example of using ifconfig to get the IP address of 172.20.6.154

 

In our example, we would put http://172.20.6.154/ in the address bar and get the following page.

 

anet-Installing WordPress on a Debian 8 Cloud Server or VPS-03 An example of the WordPress web installation on Debian 8.2

 

From here all that is needed to do is to follow along with the WordPress install and give the information required.

Congratulations! You have just installed WordPress on Debian 8.2, check back for more updates. For more information, you may want to check out the WordPress Codex.

Atlantic.Net

Atlantic.Net offers VPS hosting as well as managed server hosting services which include a layer of business-essential managed services to your hosting packages. Contact us today for more information.