How to install Wordpress using CentOS Web Panel

How to install Wordpress using CentOS Web Panel

The Wordpress is a free and open source website and blogging tool that uses PHP and MysQL. The CentOS Web Panel is a hosting platform for CentOS operating systems. Before getting started make sure you have already installed CentOS Web Panel on your Server and then create User Account and Domain for hosting. Once you have done this follow the below steps to install Wordpress on CWP. This article explains the installation of Wordpress using CentOS web panel.

Domain Name Used: wordpress.linuxhelp.com

User Account name for the respective domain - Wordpress

Installation procedure

To start with the installation procedure, download the Wordpress package using wget command followed by the download link and execute it.

[root@cwp ~]# wget http://wordpress.org/latest.tar.gz
--2017-07-27 23:57:31--  http://wordpress.org/latest.tar.gz
Resolving wordpress.org (wordpress.org)... 66.155.40.249, 66.155.40.250
Connecting to wordpress.org (wordpress.org)|66.155.40.249|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://wordpress.org/latest.tar.gz [following]
--2017-07-27 23:57:32--  https://wordpress.org/latest.tar.gz
Connecting to wordpress.org (wordpress.org)|66.155.40.249|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8169865 (7.8M) [application/octet-stream]
Saving to: ‘ latest.tar.gz’ 
100%[===================================================================================================================================================> ] 81,69,865    522KB/s   in 21s    
2017-07-27 23:57:54 (377 KB/s) - ‘ latest.tar.gz’  saved [8169865/8169865]

Now extract the package by running the tar command.

[root@cwp ~]# tar -xzf latest.tar.gz

Move all the content inside newly extracted " wordpress" directory to your domain' s document root under public_html directory of your user account for your domain you want to host.

[root@cwp wordpress]# mv * /home/wp/public_html/

Next change the ownership and file permissions for the public_html directory.

[root@cwp ~]# chown -R wp.wp /home/wp/
[root@cwp ~]# chmod -R 755 /home/wp/public_html/

Create a Database and login to MySQL database for wordpress application. Also create a user and set password for it. Grant all the privileges to the user by executing the set of commands.

[root@cwp ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with   or g.
Your MariaDB connection id is 473
Server version: 10.1.25-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type ' help '  or ' h'  for help. Type ' c'  to clear the current input statement.

MariaDB [(none)]>  CREATE DATABASE wordpress 
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]>  CREATE USER wordpressuser@localhost 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>  SET PASSWORD FOR wordpressuser@localhost= PASSWORD(" 123" ) 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>  GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY ' 123'  
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>  FLUSH PRIVILEGES 
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>  exit
Bye

Move the public_html directory and copy the file as shown below.

[root@cwp ~]# cd /home/wp/public_html/
[root@cwp public_html]# cp wp-config-sample.php wp-config.php

Now open the file wp-config.php using vim editor and mention your database details in the configuration file.

[root@cwp public_html]# vim wp-config.php

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

/** MySQL database password */
define(' DB_PASSWORD' , ' 123' ) 

Restart the apache service by running the following command.

[root@cwp ~]# systemctl restart httpd

Open your required browser and use your server IP address or domain name created for wordpress and run it. The wordpress application is running successfully and choose your required language an continue.

Enter your site' s Title, Username and password and select Install Wordpress option.

The installation procedure is complete. Click on the Log in option.

The log in page appears and now you can enter your credentials and log in to the Wordpress application.

Customize your website by performing the following changes.

Publish your website by clicking the save and publish option.

Access your website using the given IP address or domain name.

The process to host a website using Wordpress through a CentOS web panel is complete.

Comment
bugra
Jan 06 2018
i did everything you said. but when i enter the ip address of my server my guess usr/local/apache/htdocs appears. i do not know why or how. 2 days ago ive installed wordpress into the usr/local/apache/htdocs and i was using wordpress via my ip address. then i remove all of them and install like you said. to sum up, all i need is installing wordpress into my server and editing it before lunch time. (without domian, yes of course i have to use user name and domain). then im gonna point my domain to the server. is it possible ? please help me. all i need is that!!!
Add a comment
FAQ
Q
How Can I transfer my blog or website from other services to a self-hosted "WordPress" installation?
A
You can exchange any blog or site from any administration you wish. We have a rundown of aides which will assist you in transferring from your particular stage in "WordPress'
Q
How do I Start a Topic?
A
There are several ways to start new topics. The easiest is to navigate to the forums homepage where there’s a link to “Add new topic“. Clicking that link will take you to a form to fill out t
Q
Does it migrate a WordPress site to Drupal?
A
Yes. There are modules like WordPress Migrate to help you.
Q
Do I get help for my WordPress.org site here?
A
These forums are focused on helping WordPress.com users. Folks with a WordPress.org site can get help in the WordPress.org Support Forums.
Q
If its possible to install Wordpress on CentOS?
A
Please refer the link as follow "https://www.linuxhelp.com/how-to-install-wordpress-cms-4-9-5-on-centos-7/"