How To Install WordPress on Linux Distributions

by Mustaasam Saleem  June 21, 2017

So you have a bought a server and want to install WordPress on Linux. But you’re not exactly sure how to do it, right? Worry not, we’re here to help you out. Once you’re through with this tutorial, the process will be like a walk in the park for you!

How To Install WordPress on Linux

Before we move on, here are some prerequisites you should keep in mind:

1. Operating System

Once you have purchased a server, a pre-installed OS comes with it. It could be any Linux distribution, like Ubuntu or Debian. In our example, though, we’ll be using Debian 8 to install WordPress.


LAMP is an abbreviation of the top 4 tools that can be used to launch a dynamic website. These open-source components are:


Linux is an operating system for both desktop and server use. It includes the Linux kernel (the core of the operating system) as well as supporting tools and libraries. It is similar to Microsoft Windows, but in contrast, it is completely open-source and free.


Apache is a widely used open-source web server software and powers more than 67% of the websites today.


MySQL is an open-source software, one of the leading ones in Database Management tools that use structured query language to serve database queries for a web server.


PHP is an open-source web development scripting language. It is a well-known server-side language.

3. phpMyAdmin

This is a management tool use to interact with MySQL database. You can create, alter, delete, drop, import, and export all database queries directly by using phpMyAdmin.

4. WordPress

WordPress is, without a doubt, a prerequisite if you are thinking of installing it on your server.

Installing LAMP

Before installing WordPress on your server, you need to learn how to install LAMP on Debian Server. In addition, you can also learn how to install phpMyAdmin on Debian from the same source.

Download WordPress on Linux

After you’ve successfully installed LAMP stack on your server, you’ll need to download and extract the WordPress files. You’ll need to access your server via FTP or Shell. In our example, we’ll be using PuTTY to connect to our server.

Login to Server:

Open PuTTY, provide your server IP, Port, and click Open.


Provide your login credentials to get into the server. After successfully logging in, you’ll see a screen similar to the image below:

Cloudways SSH Terminal

Navigate to public_html folder by using this command:

Inside the public_html folder, we’ll create another folder named wp (WordPress). Then we’ll download, extract, and install WordPress within the newly created wp folder. Type the following command to create the folder inside the public_html folder:

Get into the wp folder by using:

Now download the WordPress Files using the following command:

Once WordPress is downloaded, extract the files by using this command:

Once the extraction process is complete, you’ll see a new folder named WordPress containing all WordPress extracted files. You can see a complete list of extracted files by typing:

Install WordPress on Debian

Now open your browser and navigate to WordPress Installation by typing your server’s IP address along with WordPress folder path. In our case, the folder path is:

Setting up database on WordPress

As you can see, it requires a database to connect with your WordPress. We’ve already setup phpMyAdmin, so we’ll use those credentials to connect the database to our WordPress Installation.

Navigate to your phpMyAdmin directory by typing this URL in your browser URL tab:


Log in with your credentials and create a database. We’ll create a database named wpdb as an example.

Creating Database

Once the database has been created, go to your browser and navigate to WordPress installation folder. In our case the URL is:

Click on Let’s go! and follow the onscreen instructions to install WordPress.

Installing WordPress

If you face the following error after filling database details, don’t worry. We just need to provide permission to the WordPress folder.

Permission Error on WordPress

Go back to your PuTTY and inside the wp folder, enter this command: (make sure you have administrative rights)

Go back to your browser, click on Run and follow the onscreen instructions.

And you’re done!

If you are not familiar with commands, here’s how to handle files and folders on Linux.

I hope you have successfully installed WordPress on Debian as well. I know it gets slightly technical to install WordPress on Linux distributions, but this revision will help you remind the steps we’ve taken to do so:

  • Setup Complete Server
  • Install LAMP
  • Install phpMyAdmin
  • Download & Unzip WordPress
  • Created Database by accessing phpMyAdmin
  • Give special permission to WordPress directory
  • Install WordPress

Lengthy procedure to install WordPress on Linux distributions manually, though, isn’t it?

You can easily avoid all the hassle by signing up on Cloudways. It’s a managed cloud-based WordPress hosting solution that will allow you to skip all the procedures explained above and provide you with a 1-click WordPress install.

Here is a peek at how easy it is to launch and install WordPress on debian with a few clicks on Cloudways:

Launch Server & Install WordPress on Cloudways

Don’t forget to share this article if you found it helpful. And if you have any queries, leave a comment below and we’ll get back shortly!

Make Your WordPress Website 100% Faster.

Host it now on Cloudways WordPress Hosting Platform.

About Mustaasam Saleem

Mustaasam is the WordPress Community Manager at Cloudways – A Managed WordPress Hosting Platform, where he actively works and loves sharing his knowledge with the WordPress Community. When he is not working, you can find him playing squash with his friends, or defending in Football, and listening to music. You can email him at

Stay Connected:

You Might Also Like...