So WordPress 5.0, code-named, “Bebo” has just been released and you are looking at installing it for building your blog? Worry not because we are bringing to you a guide on how to Install WordPress 5.x with Apache on Fedora 29/Fedora 28.
Fedora has made the installation of WordPress a very easy task. It provides by default pre-packaged softwares that ensures WordPress is installed with the least effort. Let us see how this is true.
Install WordPress 5.0 with Apache on Fedora 29/Fedora 28
Update and upgrade your system packages
dnf update dnf upgrade
Install LAMP Stack on Fedora 29/Fedora 28
As usual, LAMP stack is required in order to run WordPress. Therefore, the command below will install LAMP stack and all the required PHP extensions.
dnf install @"Web Server" php-mysqlnd mariadb-server
@"Web Server" package group installs Apache Web server and other required tools such as PHP and the required extensions. If you do not want to do this, you can install the normal packages one by one, Apache (httpd), MySQL/MariaDB, PHP and other required extensions.
We covered how to install LAMP stack on Fedora 29/Fedora 28 in our previous guide.
Install WordPress 5.x on Fedora 29/Fedora 28
WordPress 5.0 is available on the default Fedora repositories.
dnf provides wordpress Last metadata expiration check: 0:06:16 ago on Tue 08 Jan 2019 09:05:02 PM EAT. wordpress-5.0.2-1.fc29.noarch : Blog tool and publishing platform Repo : updates Matched from: Provide : wordpress = 5.0.2-1.fc29
Hence, WordPress 5.x can be installed by running the command;
dnf install wordpress ... =============================================================================================================================================================== Package Arch Version Repository Size =============================================================================================================================================================== Installing: wordpress noarch 5.0.2-1.fc29 updates 8.2 M
Configure Apache Web Server
Allow Apache through firewall in case it is running on your system.
firewall-cmd --add-port=80/tcp --permanent firewall-cmd --reload
If SELinux is running, run the commands below to allow Apache to connect to database and send mail as well. You may want to put SELinux on a permissive mode or leave it enforcing if you are conversant with how it operates;
setsebool -P httpd_can_network_connect_db=1 setsebool -P httpd_can_sendmail=1
By default, Apache is set to deny WordPress remote access. Hence to allow this, open the configuration file,
/etc/httpd/conf.d/wordpress.conf and replace the line,
Require local with the line
Require all granted.
Start and enable Apache to run on system start.
systemctl start httpd systemctl enable httpd
You can verify that Apache is ready to server your web content by navigation to the browser and entering your server IP address or the hostname. You should be able to see the default Fedora Apache web server page.
Start and enable MySQL to run on system start up.
systemctl enable mariadb systemctl start mariadb
Once that is done, run MySQL security script to set the root password, remove the test databases, remove anonymous users and disable remote root login.
Enter current password for root (enter for none): Press ENTER ... Set root password? [Y/n] y New password: STRONGPASSWORD Re-enter new password: STRONGPASSWORD ... Remove anonymous users? [Y/n] y ... Disallow root login remotely? [Y/n] y ... Remove test database and access to it? [Y/n] y ... Reload privilege tables now? [Y/n] y
Create WordPress 5.x Database
Login to MariaDB as root using the password set above.
mysql -u root -p
Then create a WordPress database.
create database testsite;
You can simply run the command below to create the database straight from the terminal.
mysqladmin create testsite -u root -p
Create Database user with all the privileges granted. After that, reload grant tables and quit.
grant all privileges on testsite.* to [email protected] identified by '[email protected]'; flush privileges; quit
Configure WordPress 5.0
Open the WordPress configuration file,
/etc/wordpress/wp-config.php, and configure database connection details.
... // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'testsite'); /** MySQL database username */ define('DB_USER', 'testadmin'); /** MySQL database password */ define('DB_PASSWORD', '[email protected]'); ...
Save the configuration file and restart the Apache web server.
systemctl restart httpd
To access, navigate to the address bar on your browser and type the URL of your WordPress like,
Perform the necessary configurations to finalize on WordPress 5.0 installation on Fedora 29/Fedora 28. After that, login to WordPress dashboard.
Magnificent!!! That is all it takes to install WordPress 5.0 with Apache on Fedora 29/Fedora 28. We hope this was informative.