How To Install WordPress on Linux Distributions

by Mustaasam Saleem  April 25, 2018

So you have a bought a server from one of the top-notch VPS and/or Cloud providers, 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.

How To Install WordPress on Linux

Read More: VPS vs Cloud hosting

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.

2. LAMP

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

Linux

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

Apache is a widely used open-source web server software and powers nearly 50% of the websites today.

MySQL

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

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.

PuTTy

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

phpMyAdmin

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:

Install WordPress on Debian

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 at 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!

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 mustaasam.saleem@cloudways.com

Stay Connected:

You Might Also Like...