Learn how to Install WordPress on Fedora 34 server or workstation edition


Fedora 34 is a popular and versatile Linux distribution that is known for its stability and security features. If you’re looking to create a website or a blog, WordPress is an excellent choice for its ease of use and extensive customization options. In this article, we will guide you through the process of installing WordPress on Fedora 34, whether you’re using the workstation or server edition.

Preparing Your Fedora 34 Environment

Before diving into the installation process, let’s ensure that your Fedora 34 environment is ready for WordPress

Ensure a Stable Internet Connection

To download the necessary software packages and dependencies, it’s crucial to have a stable internet connection. This will help ensure a smooth installation process without any interruptions.

Update Fedora 34

Before installing any new software, it’s recommended to update your Fedora 34 system to ensure you have the latest security patches and bug fixes. Open the terminal and run the following command to update your system:
sudo dnf update

Install LAMP Stack

WordPress is a PHP-based application, so we need to set up a LAMP (Linux, Apache, MySQL, PHP) stack to provide the necessary environment. Installing a LAMP stack is fairly straightforward on Fedora 34. To install Apache, enter the following command:
sudo dnf install httpd
Once Apache is installed, start the service and enable it to start automatically on system boot:
sudo systemctl start httpd
sudo systemctl enable httpd
Next, we need to install MySQL to store WordPress data. Run the following command to install MySQL and its dependencies:
sudo dnf install mysql-server
Start the MySQL service and enable it to start on system boot:
sudo systemctl start mysqld
sudo systemctl enable mysqld
To enhance the security and set a password for the MySQL root user, enter the following command: sudo mysql_secure_installation Lastly, let’s install PHP and its necessary modules:
sudo dnf install php php-mysqlnd php-gd php-xml php-mbstring
Downloading and Setting up WordPress Now that we have our Fedora 34 environment ready, it’s time to download and set up WordPress.

Download WordPress

To download the latest WordPress package, navigate to the official WordPress website and obtain the source code as a .tar.gz file. You can use the following command to download it directly to your home directory:
Once the download is complete, extract the contents of the package using the following command:
tar -xf latest.tar.gz

Configure Apache for WordPress

To host your WordPress website, we need to configure Apache to serve the WordPress files. First, move the extracted WordPress directory to the Apache document root:
sudo mv wordpress /var/www/html/
Next, assign proper ownership and permissions to the WordPress files:
sudo chown -R apache:apache /var/www/html/wordpress
sudo chmod -R 755 /var/www/html/wordpress

Create a MySQL Database for WordPress

Before WordPress can be installed, we need to create a MySQL database and user for it. Access the MySQL command line:
sudo mysql
Create a new database for WordPress:
Next, create a user and grant all privileges to the newly created database:
CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost';
WordPress Configuration Now, let’s configure WordPress with the necessary database details. Rename the wp-config-sample.php file to wp-config.php:
cd /var/www/html/wordpress
sudo mv wp-config-sample.php wp-config.php
Edit the wp-config.php file and update the following lines with your MySQL database information:
define( 'DB_NAME', 'wordpress' );
define( 'DB_USER', 'wordpressuser' );
define( 'DB_PASSWORD', 'password' );
define( 'DB_HOST', 'localhost' );
Save the file and exit the editor.

Finishing the WordPress Installation

Now that everything is set up and configured, let’s finish the WordPress installation through the web browser. In your favorite browser, navigate to Replace with your domain name. You will see the WordPress setup page. Choose your preferred language and click “Continue.” On the next screen, provide the website’s name, admin username, password, and email address. Click “Install WordPress” to proceed.

Once the installation is complete, you can log in to your WordPress dashboard using the admin username and password you specified.


You’ve successfully completed the steps outlined in this guide and now have WordPress up and running on your Fedora 34 system. Whether you’re a seasoned blogger or a curious newcomer, the possibilities are endless. You can now design a stunning website or blog that reflects your unique voice and vision. With thousands of customizable themes and plugins available, the power to personalize is at your fingertips. Share your thoughts, ideas, and passions with the world. Remember to keep your WordPress core, themes, and plugins updated to ensure optimal performance and security. For more helpful guides and tutorial, please use the search feature available at the home page of this site.

Scroll to Top