Skip to content Skip to sidebar Skip to footer

How to Install WordPress on Fedora Linux For Beginners

Learn to make a cool website on localhost with WordPress

mrfdn – I’m interested in trying to learn wordpress.

A few months ago I managed to install wordpress on my windows-based laptop to create a website on localhost.

But now I’m using linux with fedora distro.

So I just want to take note of what I did so that I successfully installed wordpress on my linux fedora.

The following tutorial can be read in full on fedora magazine.

install wordpress on fedora linux

We will only do the configuration via the terminal.

1. Open a terminal and type
sudo dnf install @”Web Server” wordpress php-mysqlnd mariadb-server
to install the required packages

2. Then type
sudo systemctl enable httpd.service mariadb.service enter then
sudo systemctl start httpd.service mariadb.service enter

3. Setup the database server by typing
sudo mysqladmin -u root password enter

4. Now create a database by typing
sudo mysqladmin create my dbwp -u root -p enter

5. Continue to give rights to the user, type
sudo mysql -D mysql -u root -p enter
will appear like this,

$ sudo mysql -D mysql -u root -p
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 6
Server version: 10.1.18-MariaDB MariaDB Server

Copyright (c) 2000, 2021, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

MariaDB
[mysql]>
GRANT ALL PRIVILEGES ON my dbwp.* TO ‘sqluser’@’localhost’ IDENTIFIED BY ‘passdb‘;
Query OK, 0 rows affected (0.00 sec)

MariaDB
[mysql]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)

MariaDB [mysql]> QUIT;
Bye

Type the appropriate command in bold. match the database that was created earlier. here
I also changed sqluser to change to root or one of the existing users in the list database.

Notes about databases:

To see a list of databases that have been created, type
show databases enter;
to select a database, type
usenameDatabaseDiList enter;
to view details of the selected database, type status enter;
To delete the database in the list, type drop database namedatabase enter;

to see the list of users in the database type SELECT User,Host FROM mysql.user enter;

6. Now setup the web server type
sudo setsebool -P httpd_can_network_connect_db=1 enter then
sudo setsebool -P httpd_can_sendmail=1 enter

7. Edit the wordpress configuration file type
sudo nano /etc/httpd/conf.d/wordpress.conf enter

Then change the text Require local Becomes Require all granted

Exit, yes, Enter

8. Configure the firewall by typing
sudo firewall-cmd –add-service=http –permanent enter, then type
sudo firewall-cmd –reload enter

9. Configure wordpress by typing
sudo nano /etc/wordpress/wp-config.php enter.

It will appear like this

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘database_name_here‘);

/** MySQL database username */
define(‘DB_USER’, ‘username_here‘);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘password_here‘);

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

Adjust to the database that has been created here
change database_name_here to my dbwp, then change username_here to root or OneUsersInListDatabase which was set above earlier, then
change password_here to passdb

9. Finally restart the web server by typing
systemctl restart httpd enter

10. Now open the browser then type localhost/wordpress, if successful you will enter the wordpress installation page, but if it fails it means there is something wrong with your database settings.

11. Please fill in the name of the site you want to use, as well as the username and password to login in wordpress.

Finished.

Additional tips for newbies who have failed to install

If you find all white wordpress pages, please delete wordpress first, then type sudo dnf install @”Web Server” wordpress php-mysqlnd mariadb-server to start the installation from scratch, because there could be a dependencies file from a damaged web server.

As for what I marked the same color as above, it’s to make sure we don’t get confused during the installation. 🙂

The final word

Hopefully this article can help you to install wordpress on your linux fedora.

And also an illustration for installing wordpress on other linux distros, although in fact the method is different.

Useful links to learn to install wp localhost and learn databases ::

  • https://fedoramagazine.org/howto-install-wordpress-fedora/
  • https://kifarunix.com/install-wordpress-5-0-with-apache-on-fedora-29-fedora-28/
  • https://www.itzgeek.com/web/wordpress/install-wordpress-on-fedora-20.html
  • https://tecadmin.net/install-wordpress-using-lamp-centos-rhel-fedora/

Post a Comment for "How to Install WordPress on Fedora Linux For Beginners"