How to install WordPress on a DigitalOcean Droplet


WordPress is a blogging software based on PHP and MySQL. This tutorial describes how to run WordPress on a DigitalOcean Droplet using Ubuntu 14.04 LTS x64, nginx, PHP and MySQL.


I assume you have a DigitalOcean Account, otherwise create one. Also I assume you have a ssh terminal application to connect with your Droplet. Once you logged in to your account, you are ready to get started with this tutorial.

Create new DigitalOcean Droplet

In your DigitalOcean, click the “New Droplet” Button in the upper right corner:

Bildschirmfoto 2015-08-10 um 14.58.22

Now you can set some configurations for your droplet:

DigitalOcean create dropletDigitalOcean create droplet select distribution

I decided to name my droplet “WordPress” and select the smallest droplet size. I decided to use the default Ubuntu 14.04 LTS x64 image because it has Long Term Support.

When done with tweaking the settings, create your droplet by clicking the large green button at the bottom of the page:

DigitalOcean create droplet

Congratulations: your (maybe) first DigitalOcean droplet is created for you. After the creation is done, your screen should look like this:

DigitalOcean droplet overview

Grab the IP underthe droplet name, in our example “”, and ssh into it using username root. The password should be mailed to your mail account or you can login with your ssh key if you have set and used one.

Install nginx

Once the installation is done, you should be able to call the ip in your brower and get the following result:

Bildschirmfoto 2015-08-10 um 15.07.32

Install MySQL server

During installation you will be prompted to create a root password. Choose a secure password!

When you chose a password and wait a few seconds, your installation is done. You should now be able to login to your MySQL server:

You will be asked for your root password you have chosen moments ago.

After entering that password, you are in your MySQL server:

MySQL console

Now we will create a new database and a new database user for the wordpress installation:


As you can see above, you have to choose a password for the wordpress database user. Remember to always choose complex passwords!

Install PHP

Next we will install the scripting language PHP:

No more interaction needed. PHP is installed now.

You have to tell nginx it can handle php files and that those files should be handled through php5-fpm.

To do that, edit /etc/nginx/sites-enabled/default with your favourite editor:

Replace around line 25


Replace around line 53:


Now restart your nginx server to apply the changes:

Install WordPress

Go to web root and download and extract WordPress:

Now all wordpress installation files are on the server and we are ready to fire up the WordPress installation:

Open up the IP in your browser again:

You should get a setup screen:

Wordpress setup step 1

Press the “Let’s go!” button and proceed to the next page:

Wordpress setup step 2 database credentials

Now you have to enter your database login data:

Database Name: wordpress
User Name: wordpress
Password: (your chosen wordpress database password)
Database Host: localhost
Table Prefix: wp_

Click the “Submit”-Button. If you database credentials are right, you should see the following screen:

Wordpress installation step 3 copy configuration

Copy everything in the text-area and put it to a new file called “wp-config.php” with a text editor of your choice.

Once done, click “Run the install”. You should see the following screen:

Wordpress setup step 4 run the install

Choose a title for your blog, choose a username, a password and a mail address for your first user account which is created automatically. Also you can decide whether your blog should be indexed by search engines.

Click “Install WordPress” at the bottom of the form and the last steps are done to setup your new blog. When done, you should see the following screen:

Wordpress setup done

Congratulations. Your new WordPress blog is set up.

Wordpress frontend defaultWordpress backend loginWordpress backend default

Remember: you should always have backups of your WordPress installation in case a server will fail and you have to recover your blog software.

Leave a Reply

Your email address will not be published. Required fields are marked *