How To Install Wordpress With Apache On Fedora 28/29/30/31/32

How To Install Wordpress With Apache On Fedora 28/29/30/31/32

I am sure you will be ecstatic using fedora server to host your wordpress blog. This time, I will show you how to install wordpress with apache on Fedora 28/29/30/31/32.

Off course, besides apache you also need php and mariadb server in place for this purpose. If you are not familiar with mariadb server, you can use mysql server or percona server instead. The rest of this blog post will explain the steps how to install wordpress on fedora server with LAMP.

1. Open command line app such as windows cmd app, linux terminal app, mac terminal app and so on.

2. Login into your vps server hosting via command line app.

To do so, type following command lines and hit enter.

ssh vps-login-username@vps-ip-address

You will be asked for vps login username password. If so, type the password and hit enter.

3. Install apache.

To do so, type following command lines and hit enter.

sudo yum install httpd

To install apache on Fedora 30/31/32, type following command lines and hit enter.

sudo dnf install httpd

4. Start apache server.

To do so, type following command lines and hit enter.

sudo systemctl start httpd

5. Restart apache server.

To do so, type following command lines and hit enter.

sudo systemctl restart httpd

6. Check status of the apache server.

To do so, type following command lines and hit enter.

systemctl status httpd 

7. Install PHP.

To install php on Fedora 28/29, type following command lines and hit enter.

sudo yum install php php-mysqlnd

8. To install php on Fedora 30/31/32, type following command lines and hit enter.

sudo dnf install php php-mysqlnd

9. Create file named info.php.

sudo nano /var/www/html/info.php

10. Add the following simple php code inside of the file.

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>

11. Visit http://ip_address/info.php with a web browser app. You should see the following page if the php is working on apache server.

How To Install Wordpress With Apache On Fedora 28/29/30/31/32

12. Install mariadb server.

To install mariadb server on Fedora 28/29, type following command lines and hit enter.

sudo yum install mariadb-server

To install mariadb server on Fedora 30/31/32, type following command lines and hit enter.

sudo dnf install mariadb-server

13. Secure the mariadb-server installation.

To do so, type following command lines and hit enter.

mysql_secure_installation

Below is recommended mariadb database server installation's security options.

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

14. Login into database server.

To do so, type following command lines and hit enter.

mysql -uroot -p

15. Create database name.

To do so, type following command lines and hit enter.

create database dbfedora;

16. Create database user.

To do so, type following command lines and hit enter.

CREATE USER 'fedorauser'@'localhost' IDENTIFIED BY 'password1234';

17. Grant all privileges of the database user on database name.

To do so, type following command lines and hit enter.

GRANT ALL PRIVILEGES ON dbfedora.* TO 'fedorauser'@'localhost';

18. Download wordpress.

To do so, type following command lines and hit enter.

cd /var/www/html
wget http://wordpress.org/latest.tar.gz

19. Extract latest.tar.gz.

To do so, type following command lines and hit enter.

tar xzvf latest.tar.gz

20. Type http://ip_address on web browser address bar and hit enter.

How To Install Wordpress With Apache On Fedora 28/29/30/31/32

Click let's go button to start the installation.

21. Enter the database you have just created into the correct place below and click submit.

How To Install Wordpress With Apache On Fedora 28/29/30/31/32

The example.

Database name: --> Fill it with the database name you have just created
Username: --> Fill it with the database username you have just created
Password: --> Fill it with the database password you have just created

22. In this step, you will be asked to create wp-config.php. The text you should write into the wp-config.php will be displayed on your computer screen. After that click 'run the installation'.

How To Install Wordpress With Apache On Fedora 28/29/30/31/32

The example of wp-config.php

<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
/** define( 'DB_NAME', 'visit2' ); */
define( 'DB_NAME', 'dbfedora' ); 

/** MySQL database username */
define( 'DB_USER', 'fedorauser' );

/** MySQL database password */
define( 'DB_PASSWORD', 'password1234' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */

define('AUTH_KEY',         'U/MXvk!Iy#6Y-Hi4^az@6{k~^-q-3!&,v2E%KhCm(OGB/*CV+-onSRI55}nUQSsu');
define('SECURE_AUTH_KEY',  'vx?x4fz,qJdbt~o>c:*ja-D<=Ui-:9TA}&dZ>rsP?eOqxT`5giP3Hj;aL$O3eCAe');
define('LOGGED_IN_KEY',    '?![t8%0Z%olzb>%FRH1va5;0KK/o=>9~+NmcWay.F!@cO*G-FvZ/eYZa0!LD25x2');
define('NONCE_KEY',        'FDv:Je-@gt4HB3fw0-CMGe~fSI`1{_g /KQ]pY$7e4cJkZmK}4qkAsS/k GH#+Jv');
define('AUTH_SALT',        '#0S<VmA/3$u/,|{:Wi:?4mY~0WZx(lHkZ Iu8rdKSb{N8|VLd|+A1QDK.<a`Pj1J');
define('SECURE_AUTH_SALT', 'Oeid>UxQT }A:LL+:6eggW}%J+r2%1+^wf[!|+Am|Y+Z&j,eQr_<naWUVObGg|W&');
define('LOGGED_IN_SALT',   't:>H8{W&ppjvW||w?cL-[eTv`w]5b_-{-0+6NSgG6S-Vh>|0z1^CLy/T<imm-WH1');
define('NONCE_SALT',       'R%z ; Izi/ XkWVeW/6j[cJ/>F&^aa=U0;9A|$lrmWZ]60N=/Hx{vTMK9++9tS$U');


/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define( 'WP_DEBUG', false );

/* That's all, stop editing! Happy publishing. */

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}

/** Sets up WordPress vars and included files. */
require_once( ABSPATH . 'wp-settings.php' );

23. Provide the information about your blog: Site Title, Username, Password, Your Email. And click install wordpress.

How To Install Wordpress With Apache On Fedora 28/29/30/31/32

24. You will see the following page if the installation is successful.

How To Install Wordpress With Apache On Fedora 28/29/30/31/32

25. Now you can login to wordpress admin with the username and password you have provided.

How To Install Wordpress With Apache On Fedora 28/29/30/31/32

How To Install Wordpress With Apache On Fedora 28/29/30/31/32

Tags :