Written by Admin on 2025-05-06

How to download WordPress on Linux

How to download WordPress on Linux

If you're looking to set up a new WordPress website, you can download and install it on your Linux machine. In this article, we'll show you how to download WordPress on Linux, step by step.

Step 1: Install LAMP on Linux

Before downloading WordPress, you need to make sure you have the LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack installed on your Linux system. To do that, you can follow the instructions below based on your Linux distribution.

Debian or Ubuntu

sudo apt update sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql

Fedora

sudo dnf update sudo dnf install httpd mariadb mariadb-server php php-mysqlnd

CentOS or RHEL

sudo yum update sudo yum install httpd mariadb mariadb-server php php-mysql

Step 2: Download WordPress

After installing the LAMP stack on Linux, you can download WordPress from the official website. Open your terminal and run

wget https://wordpress.org/latest.tar.gz

This command downloads the WordPress tarball to your current directory.

Step 3: Extract WordPress

To extract the downloaded WordPress tarball, run

tar -xzvf latest.tar.gz

This command creates a directory named wordpress in your current directory, which contains all the WordPress files.

Step 4: Configure WordPress

To configure WordPress, you need to create a MySQL/MariaDB database and user for WordPress. You can do that by running the following commands.

mysql -u root -p

This command opens the MySQL/MariaDB shell as root user. Enter your MySQL/MariaDB root password when prompted.

CREATE DATABASE wordpress; CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost'; FLUSH PRIVILEGES; exit;

These commands create a database named wordpress, a MySQL/MariaDB user named wordpressuser with password password, and grant all privileges on the wordpress database to the wordpressuser user.

Next, you need to rename the WordPress configuration file and edit it. Run the following commands to do that.

cd wordpress cp wp-config-sample.php wp-config.php nano wp-config.php

This opens the wp-config.php file in the Nano editor. Replace the following lines with your MySQL/MariaDB database and user information.

define('DB_NAME', 'database_name_here'); define('DB_USER', 'username_here'); define('DB_PASSWORD', 'password_here'); define('DB_HOST', 'localhost');

Save and exit the file.

Step 5: Install WordPress

To install WordPress, you need to move the WordPress files to the Apache root directory. Run the following commands to do that.

sudo mv wordpress /var/www/html/ sudo chown -R www-data:www-data /var/www/html/wordpress/ sudo chmod -R 755 /var/www/html/wordpress/

These commands move the WordPress files to the /var/www/html/ directory, change the ownership and permissions of the WordPress directory and its files, to allow Apache to access and write to them.

Finally, open your web browser and navigate to http://localhost/wordpress/. You should see the WordPress installation wizard. Follow the prompts to complete the installation.

Congratulations! You have successfully downloaded and installed WordPress on Linux.

How to Download All Post Content from WordPress Blog The Risks of Using Finance WordPress Nulled Themes and Plugins How to Download Premium WordPress Templates How to Download and Install a Flash WordPress Theme WordPress Download Manager Fatal Error: How to Troubleshoot WordPress Theme Maker Software Free Download How to Download a CSV File of Post Views on WordPress.com Downloading Image Files from WordPress Source Code inxqaz.nulledscripttor.com vszkuk.nulledscripttor.com 3m1fen.nulledscripttor.com 6cv7oi.nulledscripttor.com