So you bought a server from a top-notch WordPress web hosting provider, and now you want to install WordPress on Linux. If you’re not sure how to do that, don’t worry, I am here to help you. Once you’ve gone through this tutorial, the process will be like a walk in the park for you.
Before I go into the details of the process, here are some prerequisites you should keep in mind:
- Operating System
When you purchase a server, a pre-installed OS generally comes with it. It is usually a popular Linux distro, such as Ubuntu or Debian. In this tutorial, I’ll be using Debian 9 to install WordPress.
LAMP is an abbreviation of the top four technologies that are used inc combination to host and 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) and supporting tools and libraries.
Apache is a widely used open-source webserver, and according to W3Techs, it powers nearly 35% of websites today.
MySQL and MariaDB are two leading open-source database management systems. Both are powered by SQL, a structured query language used to create complex database queries for the DBMS.
PHP is a well-known open-source server-side web development scripting language. It remains among the top-three most popular programming languages for building web applications.
This is perhaps the most commonly used database management tool in the web dev industry. You can create, alter, delete, drop, import, and export database queries directly using phpMyAdmin.
As you may already know, WordPress is a popular CMS that lets you build online stores, blogs, and eLearning sites in a very friendly way. I will be installing the latest WP version (at the time of writing this tutorial, 5.6) in this tutorial.
Before installing WordPress on your server, you need to learn how to install LAMP on a Debian Server. While you are thre, you can also pick up how to install phpMyAdmin on Debian.
Download WordPress on Linux
After you’ve successfully installed the LAMP stack on your server, you’ll need to download and extract the WordPress files. You’ll need to access your server via SSH. In this example, I’ll be using PuTTY to connect to the server.
Log in to Server
Launch PuTTY, provide the server IP, port, and the username.
After that, go to Connection > SSH > Auth, browse to your private key file for authentication, and click Open.
Provide your login credentials to get into the server. After successfully logging in, you’ll see a screen similar to this:
Navigate to the html folder by using this command:
Inside the folder, I’ll create another folder named ‘farhan’. Then, I’ll download, extract, and install WordPress within the newly created folder. Type the following command to create the folder within the html folder:
sudo mkdir farhan
Get into the folder by using:
Now download the WordPress Files using the following command:
sudo wget https://wordpress.org/latest.zip
Once you’ve downloaded WordPress, extract the files by using this command:
Once the extraction process is complete, you’ll see a new folder named WordPress containing all WordPress files. You can see a full list of extracted files by typing:
Install WordPress on Debian
Now open your browser and navigate to the WordPress installation by typing the server’s IP address along with the WordPress folder path. In my case, the folder path is:
As you can see, it is asking for connecting a database. Since I have already set up phpMyAdmin, I will use the credentials to connect the database to the WordPress installation.
Create WordPress Database Using phpMyAdmin
Navigate to the phpMyAdmin directory by typing this URL in a browser tab:
Log in with the SQL credentials and create a database. I’ll create a database named farhandb for this tutorial:
Once the database has been created, go to the SSH terminal and open the WordPress folder with cd command.
Then, use the following command to create a new wp-config.php file by making a copy of the wp-config-sample.php.
sudo cp wp-config-sample.php wp-config.php
After that, open the newly created wp-config.php file and edit the three values (database name, username, and password).
To open and edit the wp-config file, use the following command:
sudo nano wp-config.php
Then, define the database name (created earlier), username, and password. Once the changes are done, press “CTRL + x” to exit, then “Y” to save the changes.
The next step is to go to the browser and navigate to the WordPress installation folder. In my case, the URL is:
Then, simply run the installation wizard and fill in the necessary information to finalize the installation process.
By now, you should have successfully installed WordPress on Debian powered server. I know it’s slightly technical to install WordPress on Linux distributions, but I hope this tutorial will simplify the process for you. In general, the steps of the process are:
- Install LAMP
- Install phpMyAdmin
- Download & Unzip WordPress
- Create a Database through phpMyAdmin
- Give special permission to the WordPress directory
- Install WordPress
As you can imagine, this process of installing WordPress on Linux takes some time to complete and in case of any mishaps, you have to start all over again.
You can easily avoid all this hassle by signing up for a Cloudways account. You will get a managed WordPress hosting platform that lets you skip all the steps 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 on the Cloudways Platform:
You might be wondering why I am recommending Cloudways here? Well, to be honest, the above-mentioned manual installation of WordPress can be tricky sometimes. In addition to the easy installation, you get:
Ease of Use & Peace of Mind
Cloudways lets you enjoy the benefits of cloud hosting without going through all the hassles of getting into the nitty-gritty, and all server related queries are just a click away. If you have any questions, simply launch a live chat session.
All servers launched at the Cloudways Platform come pre-installed with LAMP and supporting technologies such as NGINX, Varnish, Redis, and Memcached, etc. Here is what the Cloudways stack looks like:
WordPress sites hosted on Cloudways load in just a few milliseconds. You can find guides for the entire testing environment and the test results below:
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!
Customer Review at
“Beautifully optimized hosting for WordPress and Magento”
Arda Burak [Agency Owner]
Farhan is a community manager at Cloudways. He loves to work with WordPress and has a passion for web development. Mostly, he spends his time interacting with the people in the WordPress community. Apart from his work life, Farhan spends his time gaming and playing sports. Feel free to contact him at [email protected]