Install WordPress on Fedora 22 / 21 with AMP

2

WordPress Logo

WordPress is the most widely used open source web blogging and CMS written in php and MySQL. Here is the guide to install WordPress on Fedora 22 / 21, this is very simple as like having a bear; wont take more than 5 min.

Prerequisites:

WordPress requires Apache, PHP and MySQL. You can look at how to install AMP on Fedora 22 / Fedora 21.

Create Database:

Login into MariaDB.

# mysql -u root -p

Create the desired database for WordPress.

CREATE DATABASE wordpress;

Create a user with password.

CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'wppassword';

Grant the permission to the created user to access database.

GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;

Configure WordPress:

Download the latest WordPress.

# wget http://wordpress.org/latest.tar.gz

Extract it.

# tar -zxvf latest.tar.gz

Move the extracted files to /var/www/html/ directory.

# mv wordpress/* /var/www/html

Copy the wp-sample-config.php file and make it as wp-config.php file.

# cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php

Edit the config file and mention the database information.

# vi /var/www/html/wp-config.php

Default will look like below.

// ** 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');

Modified entries according to the created database user and database will look like.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'wpuser');
/** MySQL database password */
define('DB_PASSWORD', 'wppassword');
/** MySQL hostname */
define('DB_HOST', 'localhost');

Make the apache user as the owner to WordPress directory.

# chown -R apache:apache /var/www/html/

Set SELinux policy for apache directories.

# chcon -Rt httpd_sys_content_t /var/www/html

Install WordPress:

Open your browser and visit http://your-ip-address/.

Ubuntu 14.10 - Ubuntu Installation - Language Selection
Fedora WordPress Installation – Language Selection

Enter the site information and click on Install WordPress. In next page, click on continue. You will be asked to enter the password to access the WordPress admin section. If you want to enable pretty permanent, here is the post on enabling WordPress permanent links in Apache.

That’s All!.

You might also like