How to install WordPress on Ubuntu 16.04

WordPress is a powerful blogging platform for everyone. WordPress is very easy to use, powerful and has many features you need for a dynamic blog or websites. If you have your own server, you can install and run your WordPress powered website on the server with few simple steps. On this tutorial, I will guide you to install WordPress on Ubuntu 16.04 server. For your information, I install WordPress on my cloud computing (Droplet) hosted in DigitalOcean server. DigitalOcean is has some good service on cloud computing at an affordable price with a simple pricing (compared to Amazon EC2).


Step to install WordPress on Ubuntu 16.04 Server

WordPress needs a working web server with database backend on the server. Before following the tutorial on this post, make sure you have a working web server on Ubuntu 16.04. Please have a look at my previous tutorial on how to install LAMP Server on Ubuntu 16.04.

After you have a working web server, now we can start installing WordPress on Ubuntu 16.04 Server.

Step 1. Create a new database and user

We need to create a new MySQL database and new database user that will be used for WordPress. Log in to the server and create a new database. For example, wpdatabase will be used as the new database name, and wpuser will be used as the new database user.

2. Install WordPress We need to download the latest WordPress package from the official website. The version may vary. At the time this post is being written, WordPress version is 4.5.3. Use wget to download the latest WordPress.

Now we need to extract the package and move the wordpress directory to /var/www/html/

Change the permission

Create uploads directory under wp-content

Now change the group ownership so the web server can write to the uploads directory we created above.

Done. Now, we can continue configure WordPress via web browser. Open Google Chrome or other web browser and type your server IP address with the following format:

You will see the following page appear. You will be asked for the database credentials we created on the first step of this tutorial. install wordpress on ubuntu 16.04 step 1Press Lets go to continue. Then enter the database and user credential we created previously install wordpress on ubuntu 16.04 step 2Press Submit to continue. On the next step, you will see the following error displayed on the screen. install wordpress on ubuntu 16.04 step 3

The error above means that we don’t have the correct wp-config.php yet. So we need to create a new one. Open Terminal and use this command to create a new wp-config.php file under /var/www/html/wordpress/

Then paste the content from the above text into the newly created wp-config file.php. And the click Run the Install button. It should works now.

Congratulations, our new WordPress website is now installed. We will need to create a new credentials to access the WordPress dashboard as follow. install wordpress on ubuntu 16.04 step 4Thanks for reading this short tutorial how to install WordPress on Ubuntu 16.04. See you on the next tutorial.



  1. Hi there.

    I can not thank you enough for taking the time to make this WordPress Install tutorial up for all of us. I can’t tell you how many different ones I’ve tried, including setting up LAMP, for use under Linux Ubuntu 16.04 and have wound up either losing my system completely and having to reinstall everything from scratch or having to figure out how to get rid of everything I put on my system.

    It was a holy terror. But after reading both of your tutorials (one for LAMP and one for WordPress installs), I am very pleasantly pleased with the results. I purposely held on to my Microsoft Windows just to have localhost capabilities since I was striking out every time I tried to install it here on Ubuntu, thanks to the many different and incomplete instructions out there. Now, I want to believe I’m going to fly with this localhost setup and get that website of mine FINALLY completed and up and running on the internet for all to see in the very near future …. all thanks to you and to God for not letting me give up.

    Keep up the great work and please make sure you keep me posted on anything you do or make available pertaining to Linux Ubuntu 16.04 (right now).

    May the Good Lord bless you for having been a much needed blessing to me. :)

Leave a Reply

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