1. Login to your droplet via ssh

    ~$ ssh root@
    The authenticity of host ' (' can't be established.
    ECDSA key fingerprint is 79:95:46:1a:ab:37:11:8e:86:54:36:38:bb:3c:fa:c0.
    Are you sure you want to continue connecting (yes/no)?
  2. add new user

    ~# adduser developer

    and fill out following details to complete user creation (password, full name, phone number,…)

  3. ensure root privileges for your new user

    1. Open sudoers file:

      ~# nano /etc/sudoers
    2. find following row

      root    ALL=(ALL:ALL) ALL
    3. and add following below root ALL=(ALL:ALL) ALL

      developer    ALL=(ALL:ALL) ALL
  4. Change user and update system

    ~# su - developer
    1. DEBIAN

      ~$ sudo apt-get update
    2. RHEL

      ~$ sudo yum update
  5. Install Web Server

    1. DEBIAN

      ~$ sudo apt-get install apache2
    2. RHEL

      ~$ sudo yum install apache2
  6. Install mysql

    1. DEBIAN

      ~$ sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
      ~$ sudo /usr/bin/mysql_secure_installation
    2. RHEL

      ~$ sudo yum install mysql-server libapache2-mod-auth-mysql php5-mysql
      ~$ sudo /usr/bin/mysql_secure_installation
    3. Enter current password for root (enter for none):

      OK, successfully used password, moving on...
      Then the prompt will ask you if you want to change the root password. Go ahead and choose N and move on to the next steps.
      It’s easiest just to say Yes to all the options. At the end, MySQL will reload and implement the new changes.
      By default, a MySQL installation has an anonymous user, allowing anyone
      to log into MySQL without having to have a user account created for
      them.  This is intended only for testing, and to make the installation
      go a bit smoother.  You should remove them before moving into a
      production environment.
      Remove anonymous users? [Y/n] y                                            
      ... Success!
      Normally, root should only be allowed to connect from 'localhost'.  This
      ensures that someone cannot guess at the root password from the network.
      Disallow root login remotely? [Y/n] y
      ... Success!
      By default, MySQL comes with a database named 'test' that anyone can
      access.  This is also intended only for testing, and should be removed
      before moving into a production environment.
      Remove test database and access to it? [Y/n] y
      - Dropping test database...
      ... Success!
      - Removing privileges on test database...
      ... Success!
      Reloading the privilege tables will ensure that all changes made so far
      will take effect immediately.
      Reload privilege tables now? [Y/n] y
      ... Success!
      Cleaning up...
  7. Install php

    1. DEBIAN

      ~$ sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
    2. RHEL

      ~$ sudo yum install php5 libapache2-mod-php5 php5-mcrypt
  8. Prepare database for WordPress installation

    1. Login to mysql server

      ~$ mysql -uroot -ppassword
    2. Create mysql user

      mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'desired_password';
    3. Grant privileges for new user

      mysql> GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' WITH GRANT OPTION;
    4. Create database

      mysql> CREATE DATABASE wp_db;
  9. Install WordPress

    ~$ cd /var/www/html/
    ~$ wget https://wordpress.org/latest.zip
    ~$ unzip latest.zip
    ~$ mv -f /var/www/html/wordpress/* /var/www/html/
      If you don’t have unzip install it with:

    1. DEBIAN

      ~$ apt-get install unzip
    2. RHEL

      ~$ yum install unzip
  10. Access your WordPress installation via browser by typing your domain associated to your droplet or ip address you have got after droplet was created:

  11. Installation will automatically start and you should complete installation of WordPress by filling out requested fields. Following examples follow this article – be aware to use your actual details instead of the following:

    • Database user: user
    • Database user password: desired_password
    • Database name: wp_db
    • Host server: localhost