Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Install WordPress on Linux Distributions

April 25, 2018

5 Min Read
wordpress linux
Reading Time: 5 minutes

So you have a bought a server from one of the top-notch WordPress web hosting, 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’ve gone through this tutorial, the process will be like a walk in the park for you.

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 nearly 50% of the websites today.


MySQL is an open-source software, one of the leading ones in Database Management tools that use a 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 used 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.

Log in 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:

cd /var/www/public_html

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 in the public_html folder:

mkdir wp

Get into the wp folder by using:

cd wp

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 to your WordPress. We’ve already setup phpMyAdmin, so we’ll use those credentials to connect the database to our WordPress Installation.

Create WordPress Database Using phpMyAdmin

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)

chmod 777 wordpress

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

Once you are done, do not forget to tighten the WordPress security by setting up the correct file permissions:

  • All files should be 664
  • All folders should be 775
  • wp-config.php should be 660

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 the 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 WordPress hosting platform 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:

Install WordPress on Cloudways GIF


Why Cloudways?

You might be thinking why I am recommending Cloudways here? Well, to be honest, the above-mentioned manually installation of WordPress can become tricky sometimes.

To avoid all these headaches, Cloudways came into being so that you can enjoy the benefits of Cloud hosting with ease of mind. All server related queries are just a click away. If you have any questions in mind, you can easily start a live chat in the bottom right corner.

Stack at Cloudways (ThunderStack)

All servers launched at Cloudways comes pre-installed with LAMP along with some advanced level caching technologies such as Nginx, Varnish, Redis, and Memcached etc. Here is what Cloudways Stack looks like:

Cloudways Optimized Stack

WordPress sites hosted on Cloudways loads in just a few milliseconds. The entire testing environment and test results can be found in below guides:

Special thanks to the pre-installed technologies at the backend.

Curious to see how simple and easy to use Cloudways Platform is? Here is an extensive walkthrough of 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!

Share your opinion in the comment section. COMMENT NOW

Share This Article

Start Growing with Cloudways Today!

We never compromise on performance, security, and support.

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

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!