Medha Cloud Logo

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.

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

For official guidelines and additional details on installing WordPress, refer to the WordPress Codex Installation Guide.

To learn more about setting up and configuring a CentOS 7 server before installing WordPress, visit CentOS 7 Server Setup and Configuration.

Connect with Medha Cloud

Microsoft 365 Migration Form

I would like to send my contact information to MedhaCloud so that MedhaCloud can share additional information about products, services, thought leadership and invitations to flagship events with me by email. *

By submitting this form, I acknowledge that someone from MedhaCloud will contact me via email or phone to discuss my request.

Related Article

View All
chevron-down linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram