Key Takeaways
- Installing WordPress on Linux requires a LAMP stack: Linux, Apache, MySQL/MariaDB, and PHP.
- phpMyAdmin simplifies database creation and management for WordPress.
- WordPress can be manually installed on Linux servers, but managed hosting platforms like Cloudways offer 1-click WordPress installation.
- Cloudways optimized stack ensures faster page loads and hassle-free server management.
Installing WordPress on Linux can seem technical, especially if you’re new to server management. But with the right guidance, setting up WordPress on a Linux server can be straightforward.
In this tutorial, we’ll walk you through installing WordPress on Debian or Ubuntu, including setting up the LAMP stack, creating databases with phpMyAdmin, and configuring your WordPress installation. By the end, you’ll know exactly how to launch a fully functional WordPress site on Linux.
Prerequisites for Installing WordPress on Linux
1. 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. We are using managed WordPress hosting platform by Cloudways.
2. LAMP
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:
3. Linux
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.
4. Apache
Apache is a widely used open-source webserver, and according to W3Techs, it powers nearly 35% of websites today.
5. MySQL/MariaDB
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.
6. PHP
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.
7. phpMyAdmin
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.
8. WordPress
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.
Installing the LAMP Stack on Debian/Ubuntu
Before installing WordPress on your server, you need to learn how to install LAMP on a Debian Server. While you are there, you can also pick up how to install phpMyAdmin on Debian.
Downloading 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:
cd /var/www/html
![]()
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:
cd farhan
![]()
- 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:
unzip latest.zip
![]()
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: “Is”
![]()
Installing 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:
http://34.125.xxx.xxx/farhan/wordpress

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.
Creating a WordPress Database with phpMyAdmin
- Navigate to the phpMyAdmin directory by typing this URL in a browser tab:
http://34.125.xxx.xxx/phpmyadmin/

- 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.
cd wordpress
![]()
- 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:
http://34.125.xxx.xxx/farhan/wordpress/
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. You can choose between Cloudways Flexible and Autonomous.
Here is a peek at how easy it is to launch and install WordPress on Debian on the Cloudways Platform:

Why Choose Cloudways for WordPress Hosting
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.
Optimized Stack
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:
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!
Managed WordPress Hosting on Linux Made Easy
Skip the manual steps and launch your WordPress site on Linux with Cloudways. Enjoy 1-click WordPress install, server optimization, and 24/7 support.
Conclusion
Installing WordPress on Linux manually can be technical and time-consuming, from setting up the LAMP stack to creating databases and configuring WordPress files.
Using Cloudways managed WordPress hosting, you can skip these manual steps and enjoy a 1-click WordPress install, faster performance with NGINX, Varnish, Redis, and Memcached, plus peace of mind with fully managed servers.
Whether you prefer manual installation or a fully managed platform, understanding how WordPress works on Linux is essential for web developers and enthusiasts alike.
Start hosting your WordPress site on Linux today and experience hassle-free setup and blazing-fast performance.
Frequently Asked Questions
1. Can I install WordPress on Linux manually?
Yes, you can install WordPress manually on Linux by setting up a LAMP stack, downloading WordPress files, creating a database, and configuring wp-config.php.
2. What Linux distributions support WordPress installation?
Popular distributions include Debian, Ubuntu, CentOS, and Fedora. This tutorial uses Debian 9.
3. Do I need phpMyAdmin to install WordPress on Linux?
phpMyAdmin simplifies database management but is optional. You can also create databases via MySQL CLI.
4. Is managed hosting better than manual WordPress installation on Linux?
Managed hosting, like Cloudways, offers 1-click WordPress install, optimized performance, automatic backups, and server management, making it easier than manual installation.
5. Can I host multiple WordPress sites on a single Linux server?
Yes, a Linux server with proper configuration and resources can host multiple WordPress sites using virtual hosts.
Owais Khan
Owais works as a Marketing Manager at Cloudways (managed hosting platform) where he focuses on growth, demand generation, and strategic partnerships. With more than a decade of experience in digital marketing and B2B, Owais prefers to build systems that help teams achieve their full potential.