Best Server Hosting & Managed IT Company Since 2016

How to install WordPress on CentOS7

Install wordpress on centos7 In this article, we will show you how to install WordPress on a CentOS server.

Wordpress1 300x142 - How to install WordPress on CentOS7

Login to your server via SSH or KVM, via root.

Disable selinux;

setenforce 0
sed -i ‘s/enforcing/disabled/g’ /etc/selinux/config

Run the following command to install all the required packages for your LAMP stack, which will host the WordPress site;

yum install httpd php php-common php-mysqlnd php-mbstring php-gd mariadb-server mod_ssl -y

Update the Apache config to allow for htaccess to be used;

sed -i ‘s/AllowOverride none/AllowOverride all/g’ /etc/httpd/conf/httpd.conf

Start Apache & MySQL on the server;

systemctl start httpd && systemctl start mariadb

You should now be able to confirm that Apache is started by going to either your server IP address or the domain name you have pointed to the server, in this example we will use the server IP address.
Create the MySQL user and database for WordPress, enter the mysql command to get to a prompt (choose a different password to the below one, just make sure it is secure!)

GRANT ALL PRIVILEGES ON wordpress.* TO ‘wordpress’@’localhost’ IDENTIFIED BY ‘Eh4wph8WItSO’;

Download and put into place the latest version of WordPress;

curl -O
tar zxvf latest.tar.gz
mkdir /var/www/html/
mv wordpress/* /var/www/html/

Update the permissions so that we can upload files through the WordPress control panel;

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

You can now go to your site URL or IP address in the browser to complete the WordPress installation, below are the following pages you should go through to complete the install;

On the following page you should enter the details that you used earlier when creating the MySQL database;

9. Your site is now setup and ready to login to, if you go to your URL or server IP address you should see a basic WordPress installation. You can login to your WordPress admin control panel at http://IP-ADDRESS/wp-admin/.

Please have a look at our VPS servers sections to have high a speed WordPress site


About the Author
Medha Hosting
Medha Hosting is the leading global Cloud, Managed hosting and managed IT services provider with award winning platforms in USA, Europe and Asia. Medha Hosting have delivered enterprise-level hosting services to businesses of all sizes round the world since 2014 and still serve a growing base of customers. They relay heavily on our 100 percent up time guarantee, unbeatable level of client service through our triumph Support Heroes, and world reach with half-dozen data centers across five regions in Europe, US, and Asia.we have a tendency to integrate the industry’s best technology to supply you better of breed cloud hosting solutions, all backed by our triumph Support Heroes.