Problems activating your account? Send notification email to: admin@post4vps.com
Host4Fun Budget VPS Hosting
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing WordPress on CentOS 7
#1
Hey!

In this thread, we're going to learn how to install WordPress on your CentOS 7 machine. To do so, login to your server with your credentials using Putty or any other SSH client and follow the steps.

Step 1Installing LAMP Stack

Most of us would already know what LAMP stack is, for those who don't, it means "Linux, Apache, MySQL & PHP". We must install them. Since it's an easy part, we'll skip. For those who don't know, they can follow up on the tutorial given at the end of the tutorial.

Step 2 - Creating MySQL Database & Configuring Proper permissions to it.
Before we start downloading and installing WordPress, we will need to create a MySQL database and configure it properly. To do so, login to your MySQL root user by using this command.

mysql -u root -p

Now when inside MySQL terminal, use the following commands to create user & database and assign proper permissions to each other. 
mysql> CREATE DATABASE wordpress;
mysql> GRANT ALL PRIVILEGES on wordpress.* to 'wpuser'@'localhost' identified by 'your_password';
mysql> FLUSH PRIVILEGES;
mysql> exit

Note - Make sure 'wpuser' is edited with your desired username for WP's database username and 'wordpress' to be replaced as your desired name for the WP database. 
 
After configuring it, restart it.
systemctl restart mariadb

Step 3 - Downloading & Installing WordPress

Download and unzip WP package into the proper directory. After that, make 'uploads' directory as it is not created by default.
wget http://wordpress.org/latest.zip
unzip -q latest.zip -d /var/www/html/
mkdir -p /var/www/html/wordpress/wp-content/uploads
Assign proper permission to Apache to access WordPress directory and it's filed.

chown -R apache:apache /var/www/html/wordpress
chmod -R 755 /var/www/html/wordpress
chown -R :apache /var/www/html/wordpress/wp-content/uploads

Now head over to WP's directory.


cd /var/www/html/wordpress/

By default, the 'wp-config.php' is named as 'wp-config-sample.php'. To configure WordPress, we need to rename it to its original name. To do so, write the following command.
mv wp-config-sample.php wp-config.php


Now let's edit 'wp-config.php' and put values according to what we've set in step 2.

nano wp-config.php

Now edit it accordingly. We'll put the default values we've used to create the database(according to step 2).

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

/** MySQL hostname */
define('DB_HOST', 'localhost');
To save the file, press CTRL + X and then press “y” and it will ask you if you really want to save. Press ‘Enter’. In short, ‘CTRL + X > press y > press Enter’ and saved! Make sure you scroll down with arrow key and find these line and edit it accordingly and don’t touch other lines unless you completely know what you’re doing or it may result in errors.

Step 4 - Installing WordPress

To install WordPress after configuring it, go to http://your_ip_address/wordpress/wp-admin/install.php (replace your_ip_address with your server’s IP) and continue with the steps that WordPress instructs and you shall be able to completely work the way out of installing WordPress.


Detailed Article link - Installing WordPress on CentOS 7

(Note - This article is solely my work and has been published on Shadow Hosting's blog. All credits go to Shadow Hosting accordingly.)
Reply
 


Possibly Related Threads...
Thread Author Replies Views Last Post
  Setting up a Ubuntu-CentOS Server from scratch: Firewall & UFW LightDestory 3 85 09-17-2019, 03:48 AM
Last Post: humanpuff69
  Setting up a Ubuntu-CentOS Server from scratch: Securing SSH LightDestory 1 49 09-16-2019, 01:09 PM
Last Post: rudra
  Setting up a Ubuntu-CentOS Server from scratch: Remote Desktop Access & x2go LightDestory 5 166 09-12-2019, 01:33 PM
Last Post: LightDestory
  Setting up a Ubuntu-CentOS Server from scratch: Introduction LightDestory 5 178 09-11-2019, 11:47 PM
Last Post: LightDestory
  How to translate Wordpress Theme with Loco Translate Gregol 5 117 09-07-2019, 07:05 PM
Last Post: Gregol

Forum Jump:


Users browsing this thread: 1 Guest(s)

Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - SSDBlaze - VPSlices - Abc-Hosters - Hyper Expert - Shadow Hosting - Bladenode - HostDoc - Hostlease


About Post4VPS

Post4VPS is a forum/destiny where you can Delploy Your Free VPSs just by the Power of Posts.

We Provide VPSs of many locations like Germany,US,Canada,France,London,etc.

We also Provide VPSs of Both Linux and Windows OS.