Professional Documents
Culture Documents
com
WordPress installation on
Centos/RHEL 7
Originally published on
LinuxTechLab.com
WordPress is a free & open source website/blogging tool, its based on MySQL & php.
Currently it powers around 27% websites available on internet. Its ease of use makes it a
perfect choice for beginners as well as expert bloggers. WordPress supports a large
number of plugins & themes, which enhances its usability & customization. Also there is
huge community of dedicated wordpress users out there that are always willing & able
to provide support as & when needed.
In this tutorial, we are going to install wordpress on Centos 7 but same tutorial can be
used with earlier versions of RHEL/Centos also.
Pre-requisites
1- We will need a LAMP server to install wordpress on. Kindly refer to our article on
creating a LAMP server to create one. Once the LAMP server is ready, we can move on
with this tutorial.
2- Apart from the php modules installed during the installation of LAMP server, we also
need php-gd installed on our system. We can install by using following command,
$ yum install php-gd
Restart the httpd service to implement the changes.
$ systemctl restart httpd
The changes on Mysql are complete, we can now exit the Mysql.
After the package has been extracted, there will be an extracted folder called
wordpress. We need to move this folder in /var/www/html,
$ mv -vf wordpress /var/www/html
We will now assign the proper permissions i.e. grant ownership of all content inside
/var/www/html to apache user,
$ chown -R apache:apache /var/www/html/*
We will now provide our database information inside the configuration file,
$ vi wp-config.php
& make the following changes,
// ** MySQL settings You can get this info from your web host ** //
/** The name of the database for WordPress */
define(DB_NAME, wordpressdb);
/** MySQL database username */
define(DB_USER, wpuseruser);
/** MySQL database password */
define(DB_PASSWORD, wppasswd);
We have now completed our installation & partial configuration of wordpress, but we
have still not hosted the website & remaining configurations for the website will be
carried out from the browser.
You will now be asked to provide your site title, user name, password & email
account.
After entering all the information, press install WordPress button.You will now get a
confirmation with success message.
Now to login to the wordpress dashboard, click Log in button & you will be redirected to
a new page where you need to enter your username & password.
Upon successful authentication, we will enter to wordpress dashboard. Here we can
customize our website with plugins & themes, we can also upload posts, articles etc
Note:-if you dont want to have wordpress at the end of the URL, you can move all the
contents of /var/www/html/wordpress to /var/www/htm & restart the httpd service to
implement changes.We can now access our website with just the IP address or the
hostname of the server.
If you think we have helped you or just want to support us, please consider
these :-
Connect to us: Facebook | Twitter | Google Plus
LinuxTechLab.com