WordPress Installation: Step-by-Step Guide on Debian
What will you learn in this guide?
In this guide, you will convert a Debian-based server into a working WordPress site from scratch.
Database setup, file permissions, and Apache integration are covered step by step.
🧠 Technical Summary
Main topic: Installing WordPress on Debian.
Problem: Converting an empty Linux server into a website.
Solution: Creating a stable structure with WordPress, MySQL and Apache integration.
1️⃣ Preparation and Server Requirements
Before starting the installation, the LAMP structure must be installed on your server.
This structure consists of Linux, Apache, MySQL and PHP components.
It is recommended that you use a meaningful hostname such as tr1-node01.ornek.com as the server name.
2️⃣ Download WordPress Files
wget http://wordpress.org/latest.tar.gz
- This command downloads the latest version of WordPress to the server.
tar -xzvf latest.tar.gz
- This command extracts the downloaded archive to the wordpress folder.
3️⃣ Create MySQL Database and User
mysql -u root -p
- This command logs into the MySQL administration panel with root privileges.
CREATE DATABASE wp_kurumsal;
CREATE USER 'wp_admin'@'localhost' IDENTIFIED BY 'Guclu_Sifre_123';
GRANT ALL PRIVILEGES ON wp_kurumsal.* TO 'wp_admin'@'localhost';
FLUSH PRIVILEGES;
EXIT;
- These steps complete the database, user and authorization operations for WordPress.
4️⃣ Edit WordPress Configuration File
cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php
sudo nano ~/wordpress/wp-config.php
- This command copies the sample configuration and opens the edit screen.
Update the following fields with your own information:
define('DB_NAME', 'wp_kurumsal');
define('DB_USER', 'wp_admin');
define('DB_PASSWORD', 'Guclu_Sifre_123');
- These settings allow WordPress to connect to the database.
5️⃣ Move Files to Web Directory
sudo rsync -avP ~/wordpress/ /var/www/
- This command moves WordPress files with their permissions to the web directory.
sudo chown -R www-data:www-data /var/www/
- This script gives file ownership to the Apache user.
Why rsync?
- It is safer than the cp command because it preserves file permissions and structure.
6️⃣ Install Required PHP Module
sudo apt-get install php5-gd
- This module ensures the smooth operation of the WordPress installation interface.
mv /var/www/index.html /var/www/index.html.yedek
- This action disables the default Apache page.
7️⃣ Open the WordPress Installation Screen
1. From the browser, go to the following address:
http://alanadiniz.com/wp-admin/install.php
- Enter the site name and administrator information in the installation wizard.
❓ Frequently Asked Questions (FAQ)
1. Why do we use rsync? It preserves file permissions and is more secure.
2. I am getting the "Permission Denied" error, why? This error occurs if the file ownership is not www-data.
3. I forgot my database password, what should I do? You can view it in the wp-config.php file or change it in MySQL.
4. Should Debian still be preferred? Ubuntu or AlmaLinux is recommended for new projects.
🚀 Result
Installing WordPress on Debian is now complete. This structure is suitable for small and medium-sized projects. For more secure and high-performance projects, you can try the GenixNode infrastructure immediately.

